aboutsummaryrefslogtreecommitdiff
path: root/openssl/trunk/crypto/asn1/tasn_dec.c
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2006-10-09 16:47:10 +0000
committerRob Austein <sra@hactrn.net>2006-10-09 16:47:10 +0000
commit4043d7db4e466d15193c3bad3b204048fc13b785 (patch)
tree8156ce31a6e4a155fc240551f48c23b5a42a6e5e /openssl/trunk/crypto/asn1/tasn_dec.c
parentaba277548b76071e75fc9478002a6fc2145f64f1 (diff)
Merged in changes from OpenSSL 0.9.8d
svn path=/openssl/trunk/CHANGES; revision=377
Diffstat (limited to 'openssl/trunk/crypto/asn1/tasn_dec.c')
-rw-r--r--openssl/trunk/crypto/asn1/tasn_dec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/openssl/trunk/crypto/asn1/tasn_dec.c b/openssl/trunk/crypto/asn1/tasn_dec.c
index f8b27cff..ff2f77b9 100644
--- a/openssl/trunk/crypto/asn1/tasn_dec.c
+++ b/openssl/trunk/crypto/asn1/tasn_dec.c
@@ -832,6 +832,7 @@ static int asn1_d2i_ex_primitive(ASN1_VALUE **pval,
}
else if (ret == -1)
return -1;
+ ret = 0;
/* SEQUENCE, SET and "OTHER" are left in encoded form */
if ((utype == V_ASN1_SEQUENCE)
|| (utype == V_ASN1_SET) || (utype == V_ASN1_OTHER))
@@ -878,7 +879,10 @@ static int asn1_d2i_ex_primitive(ASN1_VALUE **pval,
* for UNIVERSAL class and ignore the tag.
*/
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))