]> git.ipfire.org Git - thirdparty/openssl.git/commit
Fix silent failure in ASYNC_start_job when size is 0
authorWeizhi Ao <2362422778@qq.com>
Thu, 11 Dec 2025 13:06:23 +0000 (21:06 +0800)
committerTomas Mraz <tomas@openssl.org>
Thu, 18 Dec 2025 16:34:42 +0000 (17:34 +0100)
commit5cbbced70dd7dd37b6b11dc6e5b7ca78d4d2e436
treefcad7a6aa7d2b7650c78dc74458ca558605952b9
parent576efc44ae00b58d6505df1f21cfa5cd3f58da9b
Fix silent failure in ASYNC_start_job when size is 0

When ASYNC_start_job is called with args != NULL but size == 0,
OPENSSL_malloc(0) is called. Depending on the libc implementation,
malloc(0) may return NULL, causing a silent failure.

This patch modifies the logic to skip allocation if size is 0.

CLA: trivial

Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29377)
crypto/async/async.c