Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:11.4
bochs
bochs-strncat.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bochs-strncat.patch of Package bochs
--- gui/textconfig.cc +++ gui/textconfig.cc @@ -787,11 +787,8 @@ char sep_string[2]; sep_string[0] = separator; sep_string[1] = 0; - for (int i=0; i<maxsize; i++) { - char eachbyte[16]; - sprintf (eachbyte, "%s%02x", (i>0)?sep_string : "", (unsigned int)0xff&val[i]); - strncat (buffer, eachbyte, sizeof(buffer)); - } + for (int i=0; i<maxsize; i++) + snprintf (buffer+strlen(buffer),sizeof(buffer)-strlen(buffer)-1, "%s%02x", (i>0)?sep_string : "", (unsigned int)0xff&val[i]); if (strlen (buffer) > sizeof(buffer)-4) { assert (0); // raw byte print buffer is probably overflowing. increase the max or make it dynamic }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor