]> 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:34:11 +0000 (09:34 -0400)
commitff05645178049316e5aa53d665bf5c0e05eef08c
tree06e336ba01b561b09a4bd9e6bcb11f425dc6da63
parent8c315b06e0ae0f71495e5a6548492b7ac4ea04ea
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)

(cherry picked from commit 5871953822fb02bb651abf60dfc4a0785a5a3caa)
crypto/comp/c_zstd.c