]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
rustls: fixed minor logic bug in default cipher selection
authorJan Venekamp <1422460+jan2000@users.noreply.github.com>
Mon, 9 Sep 2024 22:10:37 +0000 (00:10 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 11 Sep 2024 21:17:31 +0000 (23:17 +0200)
Follow-up to 1e03d4b

Closes #14840

lib/vtls/rustls.c

index cc86410095c4d71d215cad251f4601bea385e0cb..4a7bf540587345970bbe96c174b130ad9d5f9859 100644 (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) */