aboutsummaryrefslogtreecommitdiff
path: root/crypto/asn1/f_int.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2016-08-05 16:06:36 +0100
committerDr. Stephen Henson <steve@openssl.org>2016-08-05 16:36:17 +0100
commit3dc87806ce4517d58600b44975e14247cee1c807 (patch)
treeea8d1b68fab5cfbf08f3206fed897df0ee221604 /crypto/asn1/f_int.c
parent684bc13e58c3c53b414a5a775b1118f04ad78bd7 (diff)
downloadopenssl-3dc87806ce4517d58600b44975e14247cee1c807.zip
openssl-3dc87806ce4517d58600b44975e14247cee1c807.tar.gz
openssl-3dc87806ce4517d58600b44975e14247cee1c807.tar.bz2
Free buffer in a2i_ASN1_INTEGER() on error path.
Thank to Shi Lei for reporting this bug. Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/asn1/f_int.c')
-rw-r--r--crypto/asn1/f_int.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/asn1/f_int.c b/crypto/asn1/f_int.c
index 0f16ac0..f1ed6bb 100644
--- a/crypto/asn1/f_int.c
+++ b/crypto/asn1/f_int.c
@@ -112,6 +112,7 @@ int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size)
i -= again;
if (i % 2 != 0) {
ASN1err(ASN1_F_A2I_ASN1_INTEGER, ASN1_R_ODD_NUMBER_OF_CHARS);
+ OPENSSL_free(s);
return 0;
}
i /= 2;