]> git.ipfire.org Git - thirdparty/openssl.git/commit
apps: lib: Prevent potential NULL dereference in init_client()
authorAntonMoryakov <ant.v.moryakov@gmail.com>
Fri, 16 May 2025 14:19:21 +0000 (17:19 +0300)
committerTomas Mraz <tomas@openssl.org>
Thu, 29 May 2025 14:38:16 +0000 (16:38 +0200)
commit10412c495d0c6e7b43abce8015f0bc34e1005cd9
treedac896f82d1df189945ea161df1886f1e90754d4
parentf4084629a9069df2332eb3693d547bf6d8ac6efc
apps: lib: Prevent potential NULL dereference in init_client()

apps: lib: Simplify ba_ret handling in init_client()

Simplify logic around ba_ret assignment:
- Fail early if ba_ret == NULL
- Assign directly otherwise, without checking *ba_ret

This avoids extra nesting and matches OpenSSL's conventions.

CLA: trivial
Signed-off-by: Anton Moryakov <ant.v.moryakov@gmail.com>
Co-authored-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26783)

(cherry picked from commit 3161f460fa7eacc7a93f8edf413c78b4dcf65823)
apps/lib/s_socket.c