http://bugzilla.novell.com/show_bug.cgi?id=586112
http://bugzilla.novell.com/show_bug.cgi?id=586112#c6
Ruediger Oertel changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
CC| |ro@novell.com
Resolution|FIXED |
--- Comment #6 from Ruediger Oertel 2010-04-05 22:53:30 UTC ---
hey, funny code:
sprintf(display->ddc,"%c",'\0');
snprintf(display->ddc, strlen(display->ddc) - 1, "%s%04x",
vend_id2str(hd->vendor.id),ID_VALUE(hd->device.id)
);
toUpper (display->ddc);
okay, first we write a 0 byte to display->ddc
then we take the strlen of display->ddc, which is 0
so we try to write "-1" bytes to display->ddc from the vendor-id and
a hexcode from the device id.
what was this code really intended to do ?
let's try this:
snprintf(display->ddc, sizeof(display->ddc) - 1, "%s%04x",
vend_id2str(hd->vendor.id),ID_VALUE(hd->device.id)
);
// make sure its null terminated
sprintf((display->ddc)+strlen(display->ddc),"%c",'\0');
toUpper (display->ddc);
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.