提交 3c65047d 编写于 作者: R Rich Salz 提交者: Rich Salz

Fix memory over-read

Fix from David Baggett via tweet.
Signed-off-by: NRich Salz <rsalz@openssl.org>
Reviewed-by: NRichard Levitte <levitte@openssl.org>
上级 c03726ca
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册