From f6cdf929f75afd8327296a410feaaaedb24f7764 Mon Sep 17 00:00:00 2001 From: Georg Fritzsche Date: Tue, 2 Sep 2014 16:55:57 +0200 Subject: Bug 1061701 - Integer overflow in binary searches, r=kaie --- tests/pkcs11/netscape/suites/security/pkcs11/pk11test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/pkcs11') diff --git a/tests/pkcs11/netscape/suites/security/pkcs11/pk11test.c b/tests/pkcs11/netscape/suites/security/pkcs11/pk11test.c index 57c431199..62826f1ee 100644 --- a/tests/pkcs11/netscape/suites/security/pkcs11/pk11test.c +++ b/tests/pkcs11/netscape/suites/security/pkcs11/pk11test.c @@ -1316,7 +1316,7 @@ GetMechInfo(CK_MECHANISM_TYPE type) l = 0; r = numMechs-1; while(l <= r) { - mid = (l+r)/2; + mid = l+(r-l)/2; if(mechInfo[mid].type == type) { return &(mechInfo[mid]); } else if(mechInfo[mid].type < type) { -- cgit v1.2.1