diff options
author | Zhou Qingyang <zhou1615@umn.edu> | 2022-01-25 01:37:59 +0800 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2022-01-28 15:06:23 +0100 |
commit | 4dd085c03a885580cc945f71187131ea7fb39b70 (patch) | |
tree | 3c0718570fc9e8c53812b7b8d7478fd7ab5a78e7 /providers | |
parent | 7f1cb465c1f0e45bde8c1ee54a37e6f7641c70c6 (diff) |
Add the missing check of BN_bn2hex return value
CLA: trivial
Signed-off-by: Zhou Qingyang <zhou1615@umn.edu>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17578)
Diffstat (limited to 'providers')
-rw-r--r-- | providers/implementations/encode_decode/encode_key2text.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/providers/implementations/encode_decode/encode_key2text.c b/providers/implementations/encode_decode/encode_key2text.c index f8f9712e96..9455f97c4a 100644 --- a/providers/implementations/encode_decode/encode_key2text.c +++ b/providers/implementations/encode_decode/encode_key2text.c @@ -80,6 +80,9 @@ static int print_labeled_bignum(BIO *out, const char *label, const BIGNUM *bn) } hex_str = BN_bn2hex(bn); + if (hex_str == NULL) + return 0; + p = hex_str; if (*p == '-') { ++p; |