Fix CID 1434549: Unchecked return value in test/evp_test.c
authorFdaSilvaYY <fdasilvayy@gmail.com>
Tue, 8 Jan 2019 06:27:27 +0000 (16:27 +1000)
committerPauli <paul.dale@oracle.com>
Tue, 8 Jan 2019 06:27:27 +0000 (16:27 +1000)
commit760e2d60e62511a6fb96f547f6730d05eb5f47ec
treee7b3f944577aa84628371a6e20b97988e2e4f802
parentdf1f538f28c10f2954757164b17781040d2355ef
Fix CID 1434549: Unchecked return value in test/evp_test.c

5. check_return: Calling EVP_EncodeUpdate without checking return value
(as is done elsewhere 4 out of 5 times).

Fix CID 13716951371698: Resource leak in test/evp_test.c

- leaked_storage: Variable edata going out of scope leaks the storage it
points to.

- leaked_storage: Variable encode_ctx going out of scope leaks the
storage it points to

Fix CID 143043714304261430429 : Dereference before null check in test/drbg_cavs_test.c

check_after_deref: Null-checking drbg suggests that it
may be null, but it has already been dereferenced on all paths leading
to the check

Fix CID 1440765: Dereference before null check in test/ssltestlib.c

check_after_deref: Null-checking ctx suggests that it may be null, but
it has already been dereferenced on all paths leading to the check.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/7993)
test/drbg_cavs_test.c
test/evp_test.c
test/ssltestlib.c