projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
PR: 1854
[openssl.git]
/
crypto
/
asn1
/
evp_asn1.c
diff --git
a/crypto/asn1/evp_asn1.c
b/crypto/asn1/evp_asn1.c
index 162b37bc38a9972d6235bcdb36529b34bf165def..f3d9804860ec31fc09d885f18f3c6e3e47ad00da 100644
(file)
--- a/
crypto/asn1/evp_asn1.c
+++ b/
crypto/asn1/evp_asn1.c
@@
-115,7
+115,11
@@
int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num, unsigned char *data,
if ((osp=ASN1_STRING_new()) == NULL) return(0);
/* Grow the 'string' */
if ((osp=ASN1_STRING_new()) == NULL) return(0);
/* Grow the 'string' */
- ASN1_STRING_set(osp,NULL,size);
+ if (!ASN1_STRING_set(osp,NULL,size))
+ {
+ ASN1_STRING_free(osp);
+ return(0);
+ }
M_ASN1_STRING_length_set(osp, size);
p=M_ASN1_STRING_data(osp);
M_ASN1_STRING_length_set(osp, size);
p=M_ASN1_STRING_data(osp);