openssl/apps
AntonMoryakov 3161f460fa 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)
2025-05-29 16:37:41 +02:00
..
demoSRP Fix grammar in srp_verifier.txt 2024-04-25 11:07:20 +02:00
include Copyright year updates 2025-03-12 13:35:59 +00:00
lib apps: lib: Prevent potential NULL dereference in init_client() 2025-05-29 16:37:41 +02:00
CA.pl.in Remove DAYS argument 2025-04-15 15:22:54 +01:00
asn1parse.c Copyright year updates 2025-03-12 13:35:59 +00:00
build.info Utility for dumping OpenSSL config file 2025-05-08 11:05:42 +10:00
ca-cert.srl
ca-key.pem
ca-req.pem
ca.c apps: directly inclusion of "e_os.h when needed 2024-09-05 17:02:51 +02:00
cert.pem
ciphers.c Check that sk_SSL_CIPHER_value returns non-NULL value. 2022-09-20 18:27:17 +02:00
client.pem
cmp.c apps/cmp.c: Free bio on error to avoid memory leak 2025-05-27 19:51:55 +02:00
cms.c apps/cms.c: add failure handling for I/O errors of 'BIO_printf(out, ...)' 2025-05-14 08:43:21 +02:00
configutl.c configutl.c: Resolve possible resource leak of config file 2025-05-15 15:38:10 -04:00
crl.c Copyright year updates 2024-04-09 13:43:27 +02:00
crl2pkcs7.c Copyright year updates 2025-03-12 13:35:59 +00:00
ct_log_list.cnf
dgst.c Copyright year updates 2025-03-12 13:35:59 +00:00
dhparam.c APPS/dhparam: fix case where infile and outfile are the same 2024-10-04 12:09:33 +02:00
dsa-ca.pem
dsa-pca.pem
dsa.c Copyright year updates 2023-09-07 09:59:15 +01:00
dsa512.pem
dsa1024.pem
dsap.pem
dsaparam.c APPS/dsaparam: fix case where infile and outfile are the same 2024-10-04 12:09:33 +02:00
ec.c Copyright year updates 2023-09-07 09:59:15 +01:00
ecparam.c Copyright year updates 2025-03-12 13:35:59 +00:00
enc.c Implement interleaving aes-cbc-hmac-sha on aarch64 2025-04-14 14:53:30 +01:00
engine.c Copyright year updates 2025-03-12 13:35:59 +00:00
errstr.c Fix some invalid use of sscanf 2023-12-12 16:12:32 +00:00
fipsinstall.c fipsinstall: Save the 'status indicator' if the FIPS provider is 3.0.X. 2024-10-11 14:52:37 +02:00
gendsa.c Copyright year updates 2023-09-28 14:23:29 +01:00
genpkey.c Copyright year updates 2025-03-12 13:35:59 +00:00
genrsa.c Copyright year updates 2023-09-28 14:23:29 +01:00
info.c Add 'openssl info' item for the Windows install context 2024-10-16 19:29:53 +02:00
insta.ca.crt openssl-cmp.pod.in: Update and extend example using Insta Demo CA 2020-08-04 12:11:46 +02:00
kdf.c kdf: use the app's libctx and property query when searching for algorithms 2021-06-15 18:26:47 +10:00
list.c Add verbose output to 'openssl list -store-loaders' 2025-04-28 17:19:55 +02:00
mac.c Always use FORMAT_BINARY for infile 2022-09-20 08:18:25 +01:00
nseq.c APPS: Improve diagnostics on missing/extra args and unknown cipher/digest 2021-12-07 15:26:40 +01:00
ocsp.c apps/cms.c, apps/ocsp.c: Added NULL pointer checks 2025-03-20 11:30:57 +01:00
openssl-vms.cnf minor doc fixes for CMP and HTTP 2025-03-04 13:58:37 +01:00
openssl.c apps: directly inclusion of "e_os.h when needed 2024-09-05 17:02:51 +02:00
openssl.cnf minor doc fixes for CMP and HTTP 2025-03-04 13:58:37 +01:00
passwd.c apps/passwd.c: Convert a redundant check to assert 2024-11-29 14:33:30 +01:00
pca-cert.srl
pca-key.pem
pca-req.pem
pkcs7.c Update copyright year 2022-05-03 13:34:51 +01:00
pkcs8.c APPS/pkcs8: fix case where infile and outfile are the same 2024-10-04 12:09:33 +02:00
pkcs12.c Copyright year updates 2025-03-12 13:35:59 +00:00
pkey.c Fix default pkey(1) DER output 2025-04-24 21:12:49 +10:00
pkeyparam.c APPS/{ecparam,pkeyparam}: fix case where infile and outfile are the same 2024-10-04 12:09:33 +02:00
pkeyutl.c apps/pkeyutl.c: Add OPENSSL_free() to avoid a memory leak 2025-05-27 19:47:17 +02:00
prime.c apps/prime.c: Remove unused assignment 2025-05-19 16:23:54 +02:00
privkey.pem
progs.pl Copyright year updates 2023-09-28 14:23:29 +01:00
rand.c Augment rand argument parsing to allow scaling 2023-11-13 12:21:34 +01:00
rehash.c rehash.c: handle possible null pointer returned by OPENSSL_strdup 2024-09-09 09:20:08 +02:00
req.c apps: Change default cipher to aes-256-cbc for req, cms and smime apps 2024-11-04 09:56:55 +01:00
req.pem
rsa.c Copyright year updates 2023-09-07 09:59:15 +01:00
rsa8192.pem
rsautl.c Copyright year updates 2023-09-07 09:59:15 +01:00
s512-key.pem
s512-req.pem
s1024key.pem
s1024req.pem
s_client.c app/s_client.c: clean up and broaden use of ERR_print_errors() 2025-04-26 21:39:58 +02:00
s_server.c Copyright year updates 2025-03-12 13:35:59 +00:00
s_time.c Copyright year updates 2024-04-09 13:43:26 +02:00
server.pem
server.srl
server2.pem
sess_id.c APPS: Improve diagnostics on missing/extra args and unknown cipher/digest 2021-12-07 15:26:40 +01:00
skeyutl.c skeyutl command line utility 2025-02-15 18:51:31 +01:00
smime.c Copyright year updates 2025-03-12 13:35:59 +00:00
speed.c Copyright year updates 2025-03-12 13:35:59 +00:00
spkac.c Copyright year updates 2023-09-07 09:59:15 +01:00
srp.c openssl srp: make index.txt parsing error more verbose 2021-05-24 14:37:00 +02:00
storeutl.c The condition that is never checked has been removed. 2025-05-19 16:26:14 +02:00
testCA.pem
testdsa.h Replace OSSL_PARAM_BLD_free_params() with OSSL_PARAM_free(). 2021-04-12 16:55:30 +10:00
testrsa.h
timeouts.h
ts.c Copyright year updates 2025-03-12 13:35:59 +00:00
tsget.in convert tabs to spaces in two distributed Perl scripts 2021-09-14 07:21:22 +10:00
verify.c apps & al : Fix various typos, repeated words, align some spelling to LDP. 2022-10-12 16:55:28 +11:00
version.c Revert API change of OPENSSL_version() 2024-10-17 13:36:58 +02:00
vms_decc_init.c
x509.c apps/x509.c: Fix the -addreject option adding trust instead of rejection 2025-05-22 09:49:18 +02:00