diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/a_bitstr.c')
-rw-r--r-- | src/lib/libcrypto/asn1/a_bitstr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/libcrypto/asn1/a_bitstr.c b/src/lib/libcrypto/asn1/a_bitstr.c index e0265f69d2..f4ea96cd54 100644 --- a/src/lib/libcrypto/asn1/a_bitstr.c +++ b/src/lib/libcrypto/asn1/a_bitstr.c | |||
@@ -191,7 +191,9 @@ int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value) | |||
191 | if (a->data == NULL) | 191 | if (a->data == NULL) |
192 | c=(unsigned char *)OPENSSL_malloc(w+1); | 192 | c=(unsigned char *)OPENSSL_malloc(w+1); |
193 | else | 193 | else |
194 | c=(unsigned char *)OPENSSL_realloc(a->data,w+1); | 194 | c=(unsigned char *)OPENSSL_realloc_clean(a->data, |
195 | a->length, | ||
196 | w+1); | ||
195 | if (c == NULL) return(0); | 197 | if (c == NULL) return(0); |
196 | if (w+1-a->length > 0) memset(c+a->length, 0, w+1-a->length); | 198 | if (w+1-a->length > 0) memset(c+a->length, 0, w+1-a->length); |
197 | a->data=c; | 199 | a->data=c; |