From 30eba7f35983a917f1007bce45040c0af3442e42 Mon Sep 17 00:00:00 2001 From: "Dr. David von Oheimb" Date: Sun, 7 Aug 2022 07:08:28 +0200 Subject: stack.c: add missing direct error reporting and improve coding style Doing so, had to fix sloppiness in using the stack API in crypto/conf/conf_def.c, ssl/ssl_ciph.c, ssl/statem/statem_srvr.c, and mostly in test/helpers/ssltestlib.c. Reviewed-by: Tomas Mraz Reviewed-by: Shane Lontis Reviewed-by: David von Oheimb (Merged from https://github.com/openssl/openssl/pull/18918) --- crypto/conf/conf_def.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crypto/conf/conf_def.c') diff --git a/crypto/conf/conf_def.c b/crypto/conf/conf_def.c index 5ada0fe056..5370e06bf9 100644 --- a/crypto/conf/conf_def.c +++ b/crypto/conf/conf_def.c @@ -296,7 +296,7 @@ static int def_load_bio(CONF *conf, BIO *in, long *line) } #endif /* no more files in directory, continue with processing parent */ - if ((parent = sk_BIO_pop(biosk)) == NULL) { + if (sk_BIO_num(biosk) < 1 || (parent = sk_BIO_pop(biosk)) == NULL) { /* everything processed get out of the loop */ break; } else { -- cgit v1.2.3