summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorinoguchi <>2022-01-20 10:53:33 +0000
committerinoguchi <>2022-01-20 10:53:33 +0000
commitcd425e52a52e20b87cf9a7cd1d5ce5a75f86e3e4 (patch)
treed937219baa913df0d4efb330f9697d048d5991db /src
parentb3aaaf94f65e3ffeafabd22f37234dc20fc4f32f (diff)
downloadopenbsd-cd425e52a52e20b87cf9a7cd1d5ce5a75f86e3e4.tar.gz
openbsd-cd425e52a52e20b87cf9a7cd1d5ce5a75f86e3e4.tar.bz2
openbsd-cd425e52a52e20b87cf9a7cd1d5ce5a75f86e3e4.zip
Add check for BN functions return value
CID 21665 24835 comment from jsing@ and tb@ ok jsing@ millert@ tb@
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/bn/bn_print.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/libcrypto/bn/bn_print.c b/src/lib/libcrypto/bn/bn_print.c
index d849b860f9..9b5c753316 100644
--- a/src/lib/libcrypto/bn/bn_print.c
+++ b/src/lib/libcrypto/bn/bn_print.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_print.c,v 1.32 2021/08/31 11:19:19 tb Exp $ */ 1/* $OpenBSD: bn_print.c,v 1.33 2022/01/20 10:53:33 inoguchi Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -310,8 +310,10 @@ BN_dec2bn(BIGNUM **bn, const char *a)
310 l += *a - '0'; 310 l += *a - '0';
311 a++; 311 a++;
312 if (++j == BN_DEC_NUM) { 312 if (++j == BN_DEC_NUM) {
313 BN_mul_word(ret, BN_DEC_CONV); 313 if (!BN_mul_word(ret, BN_DEC_CONV))
314 BN_add_word(ret, l); 314 goto err;
315 if (!BN_add_word(ret, l))
316 goto err;
315 l = 0; 317 l = 0;
316 j = 0; 318 j = 0;
317 } 319 }