diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2016-08-05 16:06:36 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2016-08-05 16:36:17 +0100 |
commit | 3dc87806ce4517d58600b44975e14247cee1c807 (patch) | |
tree | ea8d1b68fab5cfbf08f3206fed897df0ee221604 /crypto/asn1/f_int.c | |
parent | 684bc13e58c3c53b414a5a775b1118f04ad78bd7 (diff) |
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.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/asn1/f_int.c b/crypto/asn1/f_int.c index 0f16ac0bbb..f1ed6bbe65 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; |