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:30:01 +0000 (16:30 +1000)
commit37cad7e65641e83d9f92b47fd0e34ea2d8c3b277
tree2ec6586e1770187a3222227917a57e8d20cbc5c2
parent25eb9299cec4404a4cdf3167056bd147af2582f3
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)

(cherry picked from commit 760e2d60e62511a6fb96f547f6730d05eb5f47ec)
test/drbg_cavs_test.c
test/evp_test.c
test/ssltestlib.c