mirror of
https://github.com/openssl/openssl.git
synced 2025-04-06 20:20:50 +08:00
Check that sk_SSL_CIPHER_value returns non-NULL value.
Fixes openssl#19162. Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19233)
This commit is contained in:
parent
4689fe1bfd
commit
630d31219b
@ -226,6 +226,10 @@ int ciphers_main(int argc, char **argv)
|
||||
if (!verbose) {
|
||||
for (i = 0; i < sk_SSL_CIPHER_num(sk); i++) {
|
||||
const SSL_CIPHER *c = sk_SSL_CIPHER_value(sk, i);
|
||||
|
||||
if (!ossl_assert(c != NULL))
|
||||
continue;
|
||||
|
||||
p = SSL_CIPHER_get_name(c);
|
||||
if (p == NULL)
|
||||
break;
|
||||
@ -241,6 +245,9 @@ int ciphers_main(int argc, char **argv)
|
||||
|
||||
c = sk_SSL_CIPHER_value(sk, i);
|
||||
|
||||
if (!ossl_assert(c != NULL))
|
||||
continue;
|
||||
|
||||
if (Verbose) {
|
||||
unsigned long id = SSL_CIPHER_get_id(c);
|
||||
int id0 = (int)(id >> 24);
|
||||
|
Loading…
x
Reference in New Issue
Block a user