summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bn/bn_print.c
diff options
context:
space:
mode:
authorbeck <>2017-01-29 17:49:23 +0000
committerbeck <>2017-01-29 17:49:23 +0000
commit957b11334a7afb14537322f0e4795b2e368b3f59 (patch)
tree1a54abba678898ee5270ae4f3404a50ee9a92eea /src/lib/libcrypto/bn/bn_print.c
parentdf96e020e729c6c37a8c7fe311fdd1fe6a8718c5 (diff)
downloadopenbsd-957b11334a7afb14537322f0e4795b2e368b3f59.tar.gz
openbsd-957b11334a7afb14537322f0e4795b2e368b3f59.tar.bz2
openbsd-957b11334a7afb14537322f0e4795b2e368b3f59.zip
Send the function codes from the error functions to the bit bucket,
as was done earlier in libssl. Thanks inoguchi@ for noticing libssl had more reacharounds into this. ok jsing@ inoguchi@
Diffstat (limited to 'src/lib/libcrypto/bn/bn_print.c')
-rw-r--r--src/lib/libcrypto/bn/bn_print.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/bn/bn_print.c b/src/lib/libcrypto/bn/bn_print.c
index f526065592..de67c03c14 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.30 2016/10/17 03:30:14 guenther Exp $ */ 1/* $OpenBSD: bn_print.c,v 1.31 2017/01/29 17:49:22 beck 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 *
@@ -80,7 +80,7 @@ BN_bn2hex(const BIGNUM *a)
80 80
81 buf = malloc(BN_is_negative(a) + a->top * BN_BYTES * 2 + 2); 81 buf = malloc(BN_is_negative(a) + a->top * BN_BYTES * 2 + 2);
82 if (buf == NULL) { 82 if (buf == NULL) {
83 BNerr(BN_F_BN_BN2HEX, ERR_R_MALLOC_FAILURE); 83 BNerror(ERR_R_MALLOC_FAILURE);
84 goto err; 84 goto err;
85 } 85 }
86 p = buf; 86 p = buf;
@@ -118,7 +118,7 @@ BN_bn2dec(const BIGNUM *a)
118 if (BN_is_zero(a)) { 118 if (BN_is_zero(a)) {
119 buf = malloc(BN_is_negative(a) + 2); 119 buf = malloc(BN_is_negative(a) + 2);
120 if (buf == NULL) { 120 if (buf == NULL) {
121 BNerr(BN_F_BN_BN2DEC, ERR_R_MALLOC_FAILURE); 121 BNerror(ERR_R_MALLOC_FAILURE);
122 goto err; 122 goto err;
123 } 123 }
124 p = buf; 124 p = buf;
@@ -140,7 +140,7 @@ BN_bn2dec(const BIGNUM *a)
140 bn_data = reallocarray(NULL, bn_data_num, sizeof(BN_ULONG)); 140 bn_data = reallocarray(NULL, bn_data_num, sizeof(BN_ULONG));
141 buf = malloc(num + 3); 141 buf = malloc(num + 3);
142 if ((buf == NULL) || (bn_data == NULL)) { 142 if ((buf == NULL) || (bn_data == NULL)) {
143 BNerr(BN_F_BN_BN2DEC, ERR_R_MALLOC_FAILURE); 143 BNerror(ERR_R_MALLOC_FAILURE);
144 goto err; 144 goto err;
145 } 145 }
146 if ((t = BN_dup(a)) == NULL) 146 if ((t = BN_dup(a)) == NULL)