inetmib1: Fix off-by-one error in findNextOidInTable.

index is 1-based, so take that into account when calculating the
pointer to pass into the compare function.
oldstable
Rob Shearman 2009-12-02 14:55:10 +00:00 committed by Alexandre Julliard
parent 190a11ddb6
commit d0f93223b1
1 changed files with 1 additions and 1 deletions

View File

@ -393,7 +393,7 @@ static UINT findNextOidInTable(AsnObjectIdentifier *oid,
* an infinite loop.
*/
for (++index; index <= table->numEntries && compare(key,
&table->entries[tableEntrySize * index]) == 0; ++index)
&table->entries[tableEntrySize * (index - 1)]) == 0; ++index)
;
}
HeapFree(GetProcessHeap(), 0, key);