Commit d0f93223 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

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.
parent 190a11dd
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment