Check that OPENSSL_zalloc was successful when creating EVP types
authorMatt Caswell <matt@openssl.org>
Tue, 26 Nov 2019 17:14:08 +0000 (17:14 +0000)
committerMatt Caswell <matt@openssl.org>
Fri, 29 Nov 2019 14:21:46 +0000 (14:21 +0000)
commitc1ff5994407bc093eca78eb2fd4f813b7ee581a2
tree1a501e787dcd4f8137258001ba46062701a66861
parentb4be6937f2a80aa48afd1e3de50749874e4ad9b5
Check that OPENSSL_zalloc was successful when creating EVP types

We were missing a NULL check in a few very similar places following an
OPENSSL_zalloc() call.

Reported-by: Ziyang Li (@Liby99)
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/10526)
crypto/evp/exchange.c
crypto/evp/pmeth_fn.c