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:23:42 +0000 (09:23 +0000)
commit0c7ca4033dcf5398334d4b78a7dfb941c8167a40
tree80d7040ecea1c5c6574d86b0106bbbd58bb3ad85
parent6aa8dab2bbfd5ad3cfc0d07fe5d7243635d5b2a2
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>
crypto/dsa/dsa_ameth.c