diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/a_bitstr.c')
-rw-r--r-- | src/lib/libcrypto/asn1/a_bitstr.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/lib/libcrypto/asn1/a_bitstr.c b/src/lib/libcrypto/asn1/a_bitstr.c index 7fa5af9bbb..11771bdd02 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.27 2018/05/12 17:44:31 jsing Exp $ */ | 1 | /* $OpenBSD: a_bitstr.c,v 1.28 2018/05/13 13:48:08 jsing 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 | * |
@@ -190,8 +190,6 @@ c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, const unsigned char **pp, long len) | |||
190 | return (NULL); | 190 | return (NULL); |
191 | } | 191 | } |
192 | 192 | ||
193 | /* These next 2 functions from Goetz Babin-Ebell <babinebell@trustcenter.de> | ||
194 | */ | ||
195 | int | 193 | int |
196 | ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value) | 194 | ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value) |
197 | { | 195 | { |
@@ -212,8 +210,7 @@ ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value) | |||
212 | if ((a->length < (w + 1)) || (a->data == NULL)) { | 210 | if ((a->length < (w + 1)) || (a->data == NULL)) { |
213 | if (!value) | 211 | if (!value) |
214 | return(1); /* Don't need to set */ | 212 | return(1); /* Don't need to set */ |
215 | c = OPENSSL_realloc_clean(a->data, a->length, w + 1); | 213 | if ((c = recallocarray(a->data, a->length, w + 1, 1)) == NULL) { |
216 | if (c == NULL) { | ||
217 | ASN1error(ERR_R_MALLOC_FAILURE); | 214 | ASN1error(ERR_R_MALLOC_FAILURE); |
218 | return 0; | 215 | return 0; |
219 | } | 216 | } |