]> git.ipfire.org Git - thirdparty/openssl.git/commit
Check for NULL cleanup function before using it in encoder_process
authorNeil Horman <nhorman@openssl.org>
Sat, 16 Dec 2023 20:32:48 +0000 (15:32 -0500)
committerNeil Horman <nhorman@openssl.org>
Fri, 16 Feb 2024 14:10:49 +0000 (09:10 -0500)
commit3baa3531be6374428ba0e6e650f9dc2c2b4827a6
tree1e0f050d9c5f3dd499ac2041f1bfbf19af09b119
parent112754183a720b4db0f2770a80a55805010b4e68
Check for NULL cleanup function before using it in encoder_process

encoder_process assumes a cleanup function has been set in the currently
in-use encoder during processing, which can lead to segfaults if said
function hasn't been set

Add a NULL check for this condition, returning -1 if it is not set

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23069)

(cherry picked from commit cf57c3ecfa416afbc47d36633981034809ee6792)
crypto/encode_decode/encoder_lib.c