diff options
author | Matt Caswell <matt@openssl.org> | 2016-06-10 16:51:39 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-06-13 17:38:39 +0100 |
commit | d356dc561925ec9cecc58a69e2280c18a49ec41a (patch) | |
tree | 3c6310c4182f1faf43e09f8a71c1fd0ceab36607 /crypto/bn/bn_print.c | |
parent | c887104f4ac27a2743c0c830d20c1e341180a48b (diff) |
Add some missing return value checks
Some misc return value checks
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/bn/bn_print.c')
-rw-r--r-- | crypto/bn/bn_print.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/bn/bn_print.c b/crypto/bn/bn_print.c index 78589dba5b..8672c7e3b3 100644 --- a/crypto/bn/bn_print.c +++ b/crypto/bn/bn_print.c @@ -241,8 +241,9 @@ int BN_dec2bn(BIGNUM **bn, const char *a) l += *a - '0'; a++; if (++j == BN_DEC_NUM) { - BN_mul_word(ret, BN_DEC_CONV); - BN_add_word(ret, l); + if (!BN_mul_word(ret, BN_DEC_CONV) + || !BN_add_word(ret, l)) + goto err; l = 0; j = 0; } |