projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make update
[oweals/openssl.git]
/
crypto
/
asn1
/
a_bitstr.c
diff --git
a/crypto/asn1/a_bitstr.c
b/crypto/asn1/a_bitstr.c
index e0265f69d2a5aea15089792a74e5ccd7c2dc8126..f4ea96cd54e8fd4524f7adc13c7cb78555b578ef 100644
(file)
--- a/
crypto/asn1/a_bitstr.c
+++ b/
crypto/asn1/a_bitstr.c
@@
-191,7
+191,9
@@
int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value)
if (a->data == NULL)
c=(unsigned char *)OPENSSL_malloc(w+1);
else
if (a->data == NULL)
c=(unsigned char *)OPENSSL_malloc(w+1);
else
- c=(unsigned char *)OPENSSL_realloc(a->data,w+1);
+ c=(unsigned char *)OPENSSL_realloc_clean(a->data,
+ a->length,
+ w+1);
if (c == NULL) return(0);
if (w+1-a->length > 0) memset(c+a->length, 0, w+1-a->length);
a->data=c;
if (c == NULL) return(0);
if (w+1-a->length > 0) memset(c+a->length, 0, w+1-a->length);
a->data=c;