projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Ensure bn_cmp_words can handle the case where n == 0
[openssl.git]
/
crypto
/
bn
/
bn_lib.c
diff --git
a/crypto/bn/bn_lib.c
b/crypto/bn/bn_lib.c
index 494ee49bda889afc08f84c38d0e22aededccd919..e624caf9b465aaa12d4d1b052332547c843376ed 100644
(file)
--- a/
crypto/bn/bn_lib.c
+++ b/
crypto/bn/bn_lib.c
@@
-695,6
+695,9
@@
int bn_cmp_words(const BN_ULONG *a, const BN_ULONG *b, int n)
int i;
BN_ULONG aa, bb;
+ if (n == 0)
+ return 0;
+
aa = a[n - 1];
bb = b[n - 1];
if (aa != bb)