From 0ca15307a351a1a4cb551bd2529e1260739fbd92 Mon Sep 17 00:00:00 2001 From: Jan Venekamp <1422460+jan2000@users.noreply.github.com> Date: Tue, 10 Sep 2024 00:10:37 +0200 Subject: [PATCH] rustls: fixed minor logic bug in default cipher selection Follow-up to 1e03d4b Closes #14840 --- lib/vtls/rustls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vtls/rustls.c b/lib/vtls/rustls.c index cc86410095..4a7bf54058 100644 --- a/lib/vtls/rustls.c +++ b/lib/vtls/rustls.c @@ -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) */ -- 2.47.3