Have OSSL_PARAM_allocate_from_text() fail on odd number of hex digits
authorRichard Levitte <levitte@openssl.org>
Tue, 23 Jan 2024 12:17:31 +0000 (13:17 +0100)
committerTomas Mraz <tomas@openssl.org>
Thu, 25 Jan 2024 15:37:43 +0000 (16:37 +0100)
commit024731b2ff469bfac95244178c086706cf73586c
treef342dcefc130a3f1b613f20c34931ba5f231c903
parentfebb086d0fc1ea12181f4d833aa9b8fdf2133b3b
Have OSSL_PARAM_allocate_from_text() fail on odd number of hex digits

The failure would be caught later on, so this went unnoticed, until someone
tried with just one hex digit, which was simply ignored.

Fixes #23373

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

(cherry picked from commit ea6268cfceaba24328d66bd14bfc97c4fac14a58)
crypto/params_from_text.c
test/params_test.c