]> git.ipfire.org Git - thirdparty/openssl.git/commit
comp/zstd: make bio_zstd_read return -1 on hard errors
authorJoshua Rogers <MegaManSec@users.noreply.github.com>
Sun, 12 Oct 2025 13:39:42 +0000 (21:39 +0800)
committerTodd Short <todd.short@me.com>
Mon, 27 Oct 2025 13:30:18 +0000 (09:30 -0400)
commit5871953822fb02bb651abf60dfc4a0785a5a3caa
tree7ec41b32ddc86f2a82122046a6bb62c2c8a28589
parent0ab2ece0a2025ebdea1f94744424ef89ffb9a2b0
comp/zstd: make bio_zstd_read return -1 on hard errors

Split NULL out param from zero outl. Return -1 on malloc failure and
NULL parameter. Keep 0 only for outl <= 0 and clean EOF. This lets
callers distinguish errors from empty reads without inspecting the
error queue.

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Paul Yang <paulyang.inf@gmail.com>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/28908)
crypto/comp/c_zstd.c