]> 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:19 +0000 (20:14 +0200)
commit568085f637ee29a5cdd09228fd94b255bb7f1c5c
tree4301dfc175f5ee1ded1b0bd5c00ff5b91d27bc48
parent961fa97def4d8de1a77ef9608b6b80bbe77cf25c
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