Patch snmp.c.patch for SNMP related Bug #61981
Patch version 2013-03-13 20:08 UTC
Return to Bug #61981 |
Download this patch
Patch Revisions:
Developer: lvgb@sina.com
--- snmp.c 2013-03-14 03:44:41.800215436 +0800
+++ snmp.patched.c 2013-03-14 03:42:37.756460303 +0800
@@ -832,9 +832,9 @@
}
} else if (st & SNMP_USE_SUFFIX_AS_KEYS && st & SNMP_CMD_WALK) {
snprint_objid(buf2, sizeof(buf2), vars->name, vars->name_length);
- if (objid_query->vars[0].name_length <= vars->name_length && snmp_oid_compare(objid_query->vars[0].name, objid_query->vars[0].name_length, vars->name, objid_query->vars[0].name_length) == 0) {
+ if (rootlen <= vars->name_length && snmp_oid_compare(root, rootlen, vars->name, rootlen) == 0) {
buf2[0] = '\0';
- count = objid_query->vars[0].name_length;
+ count = rootlen;
while(count < vars->name_length){
sprintf(buf, "%lu.", vars->name[count]);
strcat(buf2, buf);
|