diff options
author | beck <> | 2017-01-29 17:49:23 +0000 |
---|---|---|
committer | beck <> | 2017-01-29 17:49:23 +0000 |
commit | 957b11334a7afb14537322f0e4795b2e368b3f59 (patch) | |
tree | 1a54abba678898ee5270ae4f3404a50ee9a92eea /src/lib/libcrypto/asn1/a_bitstr.c | |
parent | df96e020e729c6c37a8c7fe311fdd1fe6a8718c5 (diff) | |
download | openbsd-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/asn1/a_bitstr.c')
-rw-r--r-- | src/lib/libcrypto/asn1/a_bitstr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/asn1/a_bitstr.c b/src/lib/libcrypto/asn1/a_bitstr.c index c847b471d6..9ba77d6958 100644 --- a/src/lib/libcrypto/asn1/a_bitstr.c +++ b/src/lib/libcrypto/asn1/a_bitstr.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: a_bitstr.c,v 1.23 2015/09/29 13:54:40 jsing Exp $ */ | 1 | /* $OpenBSD: a_bitstr.c,v 1.24 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 | * |
@@ -176,7 +176,7 @@ c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, const unsigned char **pp, long len) | |||
176 | return (ret); | 176 | return (ret); |
177 | 177 | ||
178 | err: | 178 | err: |
179 | ASN1err(ASN1_F_C2I_ASN1_BIT_STRING, i); | 179 | ASN1error(i); |
180 | if ((ret != NULL) && ((a == NULL) || (*a != ret))) | 180 | if ((ret != NULL) && ((a == NULL) || (*a != ret))) |
181 | ASN1_BIT_STRING_free(ret); | 181 | ASN1_BIT_STRING_free(ret); |
182 | return (NULL); | 182 | return (NULL); |
@@ -206,7 +206,7 @@ ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value) | |||
206 | return(1); /* Don't need to set */ | 206 | return(1); /* Don't need to set */ |
207 | c = OPENSSL_realloc_clean(a->data, a->length, w + 1); | 207 | c = OPENSSL_realloc_clean(a->data, a->length, w + 1); |
208 | if (c == NULL) { | 208 | if (c == NULL) { |
209 | ASN1err(ASN1_F_ASN1_BIT_STRING_SET_BIT, ERR_R_MALLOC_FAILURE); | 209 | ASN1error(ERR_R_MALLOC_FAILURE); |
210 | return 0; | 210 | return 0; |
211 | } | 211 | } |
212 | if (w + 1 - a->length > 0) | 212 | if (w + 1 - a->length > 0) |