Search
j0ke.net Open Build Service
>
Projects
>
GFS
>
net-snmp
> net-snmp-5.4.2_overflow.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File net-snmp-5.4.2_overflow.patch of Package net-snmp (Revision 3)
Currently displaying revision
3
,
show latest
Index: snmplib/mib.c =================================================================== --- snmplib/mib.c.orig 2008-07-30 09:57:19.000000000 +0200 +++ snmplib/mib.c 2008-10-24 15:30:42.854387100 +0200 @@ -1489,7 +1489,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; @@ -1553,7 +1553,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;