diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2022-08-07 07:08:28 +0200 |
---|---|---|
committer | Dr. David von Oheimb <dev@ddvo.net> | 2022-09-16 10:31:24 +0200 |
commit | acb39e29c39aef9eefd44214d43ed9498828576d (patch) | |
tree | f574279e6a1903bfa981aa1b7bbee292484c0792 /ssl/ssl_lib.c | |
parent | 25ed1e5a79b19ee9eee97dc67ecaf8c605b251f6 (diff) |
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 <tomas@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/18918)
(cherry picked from commit 30eba7f35983a917f1007bce45040c0af3442e42)
Diffstat (limited to 'ssl/ssl_lib.c')
-rw-r--r-- | ssl/ssl_lib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 75ef563f1f..f32074b585 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -4987,7 +4987,8 @@ static int ct_move_scts(STACK_OF(SCT) **dst, STACK_OF(SCT) *src, } } - while ((sct = sk_SCT_pop(src)) != NULL) { + while (sk_SCT_num(src) > 0) { + sct = sk_SCT_pop(src); if (SCT_set_source(sct, origin) != 1) goto err; |