Mailinglist Archive: opensuse-bugs (4724 mails)

< Previous Next >
[Bug 586112] Sax2 fails with buffer overflow message / Build fails with undefined symbol: xf86CheckBoolOption
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Tue, 6 Apr 2010 10:14:06 +0000
  • Message-id: <20100406101406.8919ACC7CE@xxxxxxxxxxxxxxxxxxxxxx>
http://bugzilla.novell.com/show_bug.cgi?id=586112

http://bugzilla.novell.com/show_bug.cgi?id=586112#c10


--- Comment #10 from Ruediger Oertel <ro@xxxxxxxxxx> 2010-04-06 10:14:05 UTC ---
currently using:
--- sysp/lib/hw/monitor.c
+++ sysp/lib/hw/monitor.c
@@ -58,6 +58,7 @@
unsigned portID = 0;
unsigned i = 0;
char buf[256] = "";
+ int id_length = 0;
//int vt_orig = getvt();

//chvt (1);
@@ -170,10 +171,16 @@
//===================================
// Save Monitor DDC ID ...
//-----------------------------------
- sprintf(display->ddc,"%c",'\0');
- snprintf(display->ddc, strlen(display->ddc) - 1, "%s%04x",
+ snprintf(display->ddc, sizeof(display->ddc) - 1, "%s%04x",
vend_id2str(hd->vendor.id),ID_VALUE(hd->device.id)
);
+
+ // make sure its null terminated
+ id_length = strlen(vend_id2str(hd->vendor.id)) + 4 + 1;
+ if (id_length > (sizeof(display->ddc) - 1))
+ id_length = sizeof(display->ddc) - 1;
+ sprintf((display->ddc)+id_length,"%c",'\0');
+
toUpper (display->ddc);
//===================================
// Save Monitor DisplaySize + Res

--
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.

< Previous Next >