PR: 1861
l must be > 0 or array will be accessed out of bounds.
This commit is contained in:
parent
6fe9c925d2
commit
7a0c01b41a
@ -2428,7 +2428,7 @@ static void readbn(BIGNUM **bn, BIO *bconn)
|
|||||||
int l;
|
int l;
|
||||||
|
|
||||||
l = BIO_gets(bconn, buf, sizeof buf);
|
l = BIO_gets(bconn, buf, sizeof buf);
|
||||||
assert(l >= 0);
|
assert(l > 0);
|
||||||
assert(buf[l-1] == '\n');
|
assert(buf[l-1] == '\n');
|
||||||
buf[l-1] = '\0';
|
buf[l-1] = '\0';
|
||||||
BN_hex2bn(bn, buf);
|
BN_hex2bn(bn, buf);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user