From d0f93223b1ec6cb94bf57bfb97540fe908cabf71 Mon Sep 17 00:00:00 2001 From: Rob Shearman Date: Wed, 2 Dec 2009 14:55:10 +0000 Subject: [PATCH] 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. --- dlls/inetmib1/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/inetmib1/main.c b/dlls/inetmib1/main.c index b0ff812dd7c..1e567109f83 100644 --- a/dlls/inetmib1/main.c +++ b/dlls/inetmib1/main.c @@ -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);