aboutsummaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2015-08-27 17:17:26 -0400
committerRich Salz <rsalz@openssl.org>2015-08-27 17:29:46 -0400
commit3c65047d30dacca345d30269b95af4a5c413e8d1 (patch)
treea62b8af9d27114f9239207bb0b7f961316ccb958 /crypto
parentc03726ca4153fca8d66185837008aa078969d386 (diff)
downloadopenssl-3c65047d30dacca345d30269b95af4a5c413e8d1.zip
openssl-3c65047d30dacca345d30269b95af4a5c413e8d1.tar.gz
openssl-3c65047d30dacca345d30269b95af4a5c413e8d1.tar.bz2
Fix memory over-read
Fix from David Baggett via tweet. Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/bn/bn_lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/bn/bn_lib.c b/crypto/bn/bn_lib.c
index c8e8519..2ca6bea 100644
--- 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. */
- for ( ; *s == 0 && len > 0; s++, len--)
+ for ( ; len > 0 && *s == 0; s++, len--)
continue;
n = len;
if (n == 0) {