From: Jan Venekamp <1422460+jan2000@users.noreply.github.com> Date: Mon, 9 Sep 2024 22:10:37 +0000 (+0200) Subject: rustls: fixed minor logic bug in default cipher selection X-Git-Tag: curl-8_10_1~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ca15307a351a1a4cb551bd2529e1260739fbd92;p=thirdparty%2Fcurl.git rustls: fixed minor logic bug in default cipher selection Follow-up to 1e03d4b Closes #14840 --- 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) */