]> git.ipfire.org Git - thirdparty/openssl.git/commit
OPENSSL_hexstr2buf_ex(): Handle zero-length input correctly
authorTomas Mraz <tomas@openssl.org>
Mon, 1 Jul 2024 07:30:56 +0000 (09:30 +0200)
committerTomas Mraz <tomas@openssl.org>
Tue, 2 Jul 2024 18:14:34 +0000 (20:14 +0200)
commitca830a959ef9646c65b517b95f7c95cba76e5908
treea6dd50cb953b04f24cf2e0f59805d7f3b89a2f9a
parent0da6d328d5f6d0fe0aca47a94bb55a9f2ed0628b
OPENSSL_hexstr2buf_ex(): Handle zero-length input correctly

In case of zero-length input the code wrote one byte
before the start of the output buffer. The length
of the output was also reported incorrectly in this case.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24770)

(cherry picked from commit 3f7b355733407cf777bfad5ce5b79610588bacc5)
crypto/o_str.c
test/hexstr_test.c