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:33:48 +0000 (09:33 +0000)
commit2407241fb27c5ebd69262024b8abf9486708c7e6
treec74bb74d4bbee86722a488993cb2e59971e7f7f4
parent3942e7d9ebc262fa5c5c42aba0167e06d981f004
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