diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/a_bitstr.c')
-rw-r--r-- | src/lib/libcrypto/asn1/a_bitstr.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/lib/libcrypto/asn1/a_bitstr.c b/src/lib/libcrypto/asn1/a_bitstr.c index b81bf4fc81..f4ea96cd54 100644 --- a/src/lib/libcrypto/asn1/a_bitstr.c +++ b/src/lib/libcrypto/asn1/a_bitstr.c | |||
@@ -194,12 +194,8 @@ int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value) | |||
194 | c=(unsigned char *)OPENSSL_realloc_clean(a->data, | 194 | c=(unsigned char *)OPENSSL_realloc_clean(a->data, |
195 | a->length, | 195 | a->length, |
196 | w+1); | 196 | w+1); |
197 | if (c == NULL) | 197 | if (c == NULL) return(0); |
198 | { | 198 | if (w+1-a->length > 0) memset(c+a->length, 0, w+1-a->length); |
199 | ASN1err(ASN1_F_ASN1_BIT_STRING_SET_BIT,ERR_R_MALLOC_FAILURE); | ||
200 | return 0; | ||
201 | } | ||
202 | if (w+1-a->length > 0) memset(c+a->length, 0, w+1-a->length); | ||
203 | a->data=c; | 199 | a->data=c; |
204 | a->length=w+1; | 200 | a->length=w+1; |
205 | } | 201 | } |