php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #61981
Patch snmp.c.patch revision 2013-03-13 20:08 UTC by lvgb at sina dot com

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);
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Wed Apr 23 07:02:14 2014 UTC