mirror of https://github.com/openssl/openssl
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) {
|
if (!verbose) {
|
||||||
for (i = 0; i < sk_SSL_CIPHER_num(sk); i++) {
|
for (i = 0; i < sk_SSL_CIPHER_num(sk); i++) {
|
||||||
const SSL_CIPHER *c = sk_SSL_CIPHER_value(sk, i);
|
const SSL_CIPHER *c = sk_SSL_CIPHER_value(sk, i);
|
||||||
|
|
||||||
|
if (!ossl_assert(c != NULL))
|
||||||
|
continue;
|
||||||
|
|
||||||
p = SSL_CIPHER_get_name(c);
|
p = SSL_CIPHER_get_name(c);
|
||||||
if (p == NULL)
|
if (p == NULL)
|
||||||
break;
|
break;
|
||||||
|
@ -241,6 +245,9 @@ int ciphers_main(int argc, char **argv)
|
||||||
|
|
||||||
c = sk_SSL_CIPHER_value(sk, i);
|
c = sk_SSL_CIPHER_value(sk, i);
|
||||||
|
|
||||||
|
if (!ossl_assert(c != NULL))
|
||||||
|
continue;
|
||||||
|
|
||||||
if (Verbose) {
|
if (Verbose) {
|
||||||
unsigned long id = SSL_CIPHER_get_id(c);
|
unsigned long id = SSL_CIPHER_get_id(c);
|
||||||
int id0 = (int)(id >> 24);
|
int id0 = (int)(id >> 24);
|
||||||
|
|
Loading…
Reference in New Issue