projects
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c03726c
)
Fix memory over-read
author
Rich Salz
<rsalz@akamai.com>
Thu, 27 Aug 2015 21:17:26 +0000
(17:17 -0400)
committer
Rich Salz
<rsalz@openssl.org>
Thu, 27 Aug 2015 21:29:46 +0000
(17:29 -0400)
Fix from David Baggett via tweet.
Signed-off-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
crypto/bn/bn_lib.c
patch
|
blob
|
history
diff --git
a/crypto/bn/bn_lib.c
b/crypto/bn/bn_lib.c
index c8e8519d8ba34b7fd7fcd678fb9680a304d23bfa..2ca6beab364d801df75c2230572668644941d68f 100644
(file)
--- a/
crypto/bn/bn_lib.c
+++ b/
crypto/bn/bn_lib.c
@@
-553,7
+553,7
@@
BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret)
return (NULL);
bn_check_top(ret);
/* Skip leading zero's. */
return (NULL);
bn_check_top(ret);
/* Skip leading zero's. */
- for ( ;
*s == 0 && len >
0; s++, len--)
+ for ( ;
len > 0 && *s ==
0; s++, len--)
continue;
n = len;
if (n == 0) {
continue;
n = len;
if (n == 0) {