summaryrefslogtreecommitdiff
path: root/tests/pkcs11
diff options
context:
space:
mode:
authorGeorg Fritzsche <georg.fritzsche@googlemail.com>2014-09-02 16:55:57 +0200
committerGeorg Fritzsche <georg.fritzsche@googlemail.com>2014-09-02 16:55:57 +0200
commitf6cdf929f75afd8327296a410feaaaedb24f7764 (patch)
tree506b01948c03fcb6d8255f8ef635f9d86a7e09b1 /tests/pkcs11
parent2f5b478459e5445df2bff625c5668a4d56dd4864 (diff)
downloadnss-hg-f6cdf929f75afd8327296a410feaaaedb24f7764.tar.gz
Bug 1061701 - Integer overflow in binary searches, r=kaie
Diffstat (limited to 'tests/pkcs11')
-rw-r--r--tests/pkcs11/netscape/suites/security/pkcs11/pk11test.c2
1 files changed, 1 insertions, 1 deletions
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) {