From 6f414aef0e58826011a04d9a2b66f4ae5de4327e Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Thu, 31 Aug 2006 20:11:30 +0000 Subject: [PATCH] Update from HEAD. --- crypto/asn1/tasn_dec.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crypto/asn1/tasn_dec.c b/crypto/asn1/tasn_dec.c index c22501fc63..e5d5e4bfd1 100644 --- a/crypto/asn1/tasn_dec.c +++ b/crypto/asn1/tasn_dec.c @@ -662,7 +662,11 @@ static int asn1_d2i_ex_primitive(ASN1_VALUE **pval, unsigned char **in, long inl * internally irrespective of the type. So instead just check * for UNIVERSAL class and ignore the tag. */ - if(!asn1_collect(&buf, &p, plen, inf, -1, V_ASN1_UNIVERSAL)) goto err; + if(!asn1_collect(&buf, &p, plen, inf, -1, V_ASN1_UNIVERSAL)) + { + free_cont = 1; + goto err; + } len = buf.length; /* Append a final null to string */ if(!BUF_MEM_grow_clean(&buf, len + 1)) { -- 2.25.1