From: Henrik Nordstrom Date: Tue, 15 Jun 2010 22:54:06 +0000 (+0200) Subject: off-by-one error when comparing SNMP OIDs when building the mib tree X-Git-Tag: SQUID_3_2_0_1~132 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=518c778ab0a2bd23d6d229b525240d40932d3176;p=thirdparty%2Fsquid.git off-by-one error when comparing SNMP OIDs when building the mib tree --- diff --git a/src/snmp_core.cc b/src/snmp_core.cc index 63821ded41..02caad5691 100644 --- a/src/snmp_core.cc +++ b/src/snmp_core.cc @@ -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