fix missing null check in kdf_test_ctrl
authorNeil Horman <nhorman@openssl.org>
Fri, 26 Jan 2024 16:33:18 +0000 (11:33 -0500)
committerNeil Horman <nhorman@openssl.org>
Tue, 30 Jan 2024 16:02:17 +0000 (11:02 -0500)
commitcc8e39297a000df85a90f97f686cb210470d9697
tree8c82d56f450f0efef5dab417d2b9d7024729e18d
parent3431a67d7f13f7c398c819ac944b99c70b26d853
fix missing null check in kdf_test_ctrl

Coverity issue 1453632 noted a missing null check in kdf_test_ctrl
recently.  If a malformed value is passed in from the test file that
does not contain a ':' character, the p variable will be NULL, leading
to a NULL derefence prepare_from_text

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/23398)

(cherry picked from commit 6ca1d3ee81b61bc973e4e1079ec68ac73331c159)
test/evp_test.c