rustls: fixed minor logic bug in default cipher selection

Follow-up to 1e03d4b

Closes #14840
This commit is contained in:
Jan Venekamp 2024-09-10 00:10:37 +02:00 committed by Daniel Stenberg
parent 6a9f3764f1
commit 0ca15307a3
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -508,7 +508,7 @@ add_ciphers:
struct rustls_str s;
entry = rustls_default_ciphersuites_get_entry(j);
s = rustls_supported_ciphersuite_get_name(entry);
if(s.len < 5 || strncmp(s.data, "TLS13", 5) == 0)
if(s.len >= 5 && strncmp(s.data, "TLS13", 5) == 0)
continue;
/* No duplicates allowed (so selected cannot overflow) */