diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/evp_asn1.c')
-rw-r--r-- | src/lib/libcrypto/asn1/evp_asn1.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/libcrypto/asn1/evp_asn1.c b/src/lib/libcrypto/asn1/evp_asn1.c index 3506005a71..f92ce6cb5d 100644 --- a/src/lib/libcrypto/asn1/evp_asn1.c +++ b/src/lib/libcrypto/asn1/evp_asn1.c | |||
@@ -115,7 +115,11 @@ int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num, unsigned char *data, | |||
115 | 115 | ||
116 | if ((osp=ASN1_STRING_new()) == NULL) return(0); | 116 | if ((osp=ASN1_STRING_new()) == NULL) return(0); |
117 | /* Grow the 'string' */ | 117 | /* Grow the 'string' */ |
118 | ASN1_STRING_set(osp,NULL,size); | 118 | if (!ASN1_STRING_set(osp,NULL,size)) |
119 | { | ||
120 | ASN1_STRING_free(osp); | ||
121 | return(0); | ||
122 | } | ||
119 | 123 | ||
120 | M_ASN1_STRING_length_set(osp, size); | 124 | M_ASN1_STRING_length_set(osp, size); |
121 | p=M_ASN1_STRING_data(osp); | 125 | p=M_ASN1_STRING_data(osp); |