The branch master has been updated
via 4dd085c03a885580cc945f71187131ea7fb39b70 (commit)
from 7f1cb465c1f0e45bde8c1ee54a37e6f7641c70c6 (commit)
- Log -----------------------------------------------------------------
commit 4dd085c03a885580cc945f71187131ea7fb39b70
Author: Zhou Qingyang <[email protected]>
Date: Tue Jan 25 01:37:59 2022 +0800
Add the missing check of BN_bn2hex return value
CLA: trivial
Signed-off-by: Zhou Qingyang <[email protected]>
Reviewed-by: Paul Dale <[email protected]>
Reviewed-by: Matt Caswell <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from https://github.com/openssl/openssl/pull/17578)
-----------------------------------------------------------------------
Summary of changes:
providers/implementations/encode_decode/encode_key2text.c | 3 +++
1 file changed, 3 insertions(+)
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;