Fix dsa_pub_encode
authorMatt Caswell <matt@openssl.org>
Wed, 11 Mar 2015 20:19:08 +0000 (20:19 +0000)
committerMatt Caswell <matt@openssl.org>
Thu, 12 Mar 2015 09:29:48 +0000 (09:29 +0000)
commit20223855e418e1a4cd5f964e4e504d53b8a00fd4
treea77744f6f79f55aad70b839a8c5d82c9a21f675d
parent563fc239d23985f7e7a7300003bd8eb173224354
Fix dsa_pub_encode

The return value from ASN1_STRING_new() was not being checked which could
lead to a NULL deref in the event of a malloc failure. Also fixed a mem
leak in the error path.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit 0c7ca4033dcf5398334d4b78a7dfb941c8167a40)
crypto/dsa/dsa_ameth.c