summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-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 }