]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
rustls: minor adjustment of sizeof()
authorDaniel Stenberg <daniel@haxx.se>
Sat, 15 Nov 2025 22:56:31 +0000 (23:56 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 16 Nov 2025 16:54:49 +0000 (17:54 +0100)
The mistake is harmless because it is still a size of a pointer, but
this is the correct pointer.

Acked-by: Daniel McCarney
Reported-by: pelioro on hackerone
Bug: https://hackerone.com/reports/3427460
Closes #19545

lib/vtls/rustls.c

index ab229092786779a28ccce89c62785f9974985a35..f5e328831670538967699197b2d7ddf2f03520ee 100644 (file)
@@ -586,7 +586,7 @@ init_config_builder(struct Curl_easy *data,
   }
 #endif /* USE_ECH */
 
-  cipher_suites = malloc(sizeof(cipher_suites) * (cipher_suites_len));
+  cipher_suites = malloc(sizeof(*cipher_suites) * (cipher_suites_len));
   if(!cipher_suites) {
     result = CURLE_OUT_OF_MEMORY;
     goto cleanup;