summaryrefslogtreecommitdiffstats
path: root/crypto/conf
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2022-10-12 10:36:20 +0200
committerTomas Mraz <tomas@openssl.org>2022-10-21 18:03:33 +0200
commit367ee2152e019d72f63537ae898eda311bc9219a (patch)
treecde4b048352703e8cc0ba8ed0ed58d4666887855 /crypto/conf
parentd8f0b0fc1fe520939c0a2ae1aafd394afcde4e55 (diff)
stack: Do not add error if pop/shift/value accesses outside of the stack
This partially reverts commit 30eba7f35983a917f1007bce45040c0af3442e42. This is legitimate use of the stack functions and no error should be reported apart from the NULL return value. Fixes #19389 Reviewed-by: Todd Short <todd.short@me.com> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19400) (cherry picked from commit a8086e6bfc37355626393751a94bc5c92df7e9d3)
Diffstat (limited to 'crypto/conf')
-rw-r--r--crypto/conf/conf_def.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/conf/conf_def.c b/crypto/conf/conf_def.c
index 97c9fbc280..b5d6668f42 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 (sk_BIO_num(biosk) < 1 || (parent = sk_BIO_pop(biosk)) == NULL) {
+ if ((parent = sk_BIO_pop(biosk)) == NULL) {
/* everything processed get out of the loop */
break;
} else {