]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
off-by-one error when comparing SNMP OIDs when building the mib tree
authorHenrik Nordstrom <henrik@henriknordstrom.net>
Tue, 15 Jun 2010 22:54:06 +0000 (00:54 +0200)
committerHenrik Nordstrom <henrik@henriknordstrom.net>
Tue, 15 Jun 2010 22:54:06 +0000 (00:54 +0200)
src/snmp_core.cc

index 63821ded41418a363a9c1d540e4b0b5f42499691..02caad56910e9719e9b238f070da758d0189b678 100644 (file)
@@ -935,7 +935,7 @@ snmpLookupNodeStr(mib_tree_entry *root, const char *str)
     }
 
     int i, r = 1;
-    while (r <= namelen) {
+    while (r < namelen) {
 
         /* Find the child node which matches this */
         for (i = 0; i < e->children && e->leaves[i]->name[r] != name[r]; i++) ; // seek-loop