net-snmp/net-snmp-5.4.2_overflow.patch
OBS User autobuild 9bb07c73bc Accepting request 29044 from home:hennevogel:TODO
Copy from home:hennevogel:TODO/net-snmp based on submit request 29044 from user coolo

OBS-URL: https://build.opensuse.org/request/show/29044
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/net-snmp?expand=0&rev=23
2010-01-21 10:28:30 +00:00

23 lines
829 B
Diff

Index: snmplib/mib.c
===================================================================
--- snmplib/mib.c.orig
+++ snmplib/mib.c
@@ -1507,7 +1507,7 @@ sprint_realloc_gauge(u_char ** buf, size
return 0;
}
} else {
- sprintf(tmp, "%lu", *var->val.integer);
+ sprintf(tmp, "%u", (unsigned int)(*var->val.integer & 0xffffffff));
if (!snmp_strcat
(buf, buf_len, out_len, allow_realloc, (const u_char *) tmp)) {
return 0;
@@ -1571,7 +1571,7 @@ sprint_realloc_counter(u_char ** buf, si
return 0;
}
}
- sprintf(tmp, "%lu", *var->val.integer);
+ sprintf(tmp, "%u", (unsigned int)(*var->val.integer & 0xffffffff));
if (!snmp_strcat
(buf, buf_len, out_len, allow_realloc, (const u_char *) tmp)) {
return 0;