diff options
| author | beck <> | 2017-01-29 17:49:23 +0000 |
|---|---|---|
| committer | beck <> | 2017-01-29 17:49:23 +0000 |
| commit | d1f47bd292f36094480caa49ada36b99a69c59b0 (patch) | |
| tree | 1a54abba678898ee5270ae4f3404a50ee9a92eea /src/lib/libcrypto/asn1/a_bitstr.c | |
| parent | f8c627888330b75c2eea8a3c27d0efe947a4f9da (diff) | |
| download | openbsd-d1f47bd292f36094480caa49ada36b99a69c59b0.tar.gz openbsd-d1f47bd292f36094480caa49ada36b99a69c59b0.tar.bz2 openbsd-d1f47bd292f36094480caa49ada36b99a69c59b0.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) |
