mirror of
https://github.com/openssl/openssl.git
synced 2025-01-12 13:36:28 +08:00
Add static check in BN_hex2bn
Fixes #17298 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17299)
This commit is contained in:
parent
a595e3286a
commit
7c78bd4be8
@ -154,6 +154,10 @@ int BN_hex2bn(BIGNUM **bn, const char *a)
|
||||
return 0;
|
||||
} else {
|
||||
ret = *bn;
|
||||
if (BN_get_flags(ret, BN_FLG_STATIC_DATA)) {
|
||||
ERR_raise(ERR_LIB_BN, ERR_R_PASSED_INVALID_ARGUMENT);
|
||||
return 0;
|
||||
}
|
||||
BN_zero(ret);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user