Fix a crash in reuse of i2d_X509_PUBKEY
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Wed, 30 Jan 2019 15:20:31 +0000 (16:20 +0100)
committerBernd Edlinger <bernd.edlinger@hotmail.de>
Thu, 31 Jan 2019 18:27:37 +0000 (19:27 +0100)
commit1b66fc87da7c3851d7229993219336afa587f325
tree9a82855425bd89294239e68a8c56ab6d0e204188
parentdf3b7b99a8e38c7bcb0d7f635ceb292c4ed862e8
Fix a crash in reuse of i2d_X509_PUBKEY

If the second PUBKEY is malformed there is use after free.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8122)

(cherry picked from commit 5dc40a83c74be579575a512b30d9c1e0364e6a7b)
crypto/x509/x_pubkey.c
test/evp_extra_test.c