stack: Do not add error if pop/shift/value accesses outside of the stack
authorTomas Mraz <tomas@openssl.org>
Wed, 12 Oct 2022 08:36:20 +0000 (10:36 +0200)
committerTomas Mraz <tomas@openssl.org>
Fri, 21 Oct 2022 16:03:33 +0000 (18:03 +0200)
commit367ee2152e019d72f63537ae898eda311bc9219a
treecde4b048352703e8cc0ba8ed0ed58d4666887855
parentd8f0b0fc1fe520939c0a2ae1aafd394afcde4e55
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)
crypto/conf/conf_def.c
crypto/stack/stack.c
ssl/ssl_lib.c
ssl/statem/statem_srvr.c
test/helpers/ssltestlib.c