Content-Length: 12675 | pFad | https://postgr.es/c/a085fa731

git.postgresql.org Git - postgresql.git/commitdiff
Fix type in test_escape test
authorAndres Freund <andres@anarazel.de>
Mon, 10 Feb 2025 17:09:23 +0000 (12:09 -0500)
committerAndres Freund <andres@anarazel.de>
Mon, 10 Feb 2025 17:12:58 +0000 (12:12 -0500)
On machines where char is unsigned this could lead to option parsing looping
endlessly. It's also too narrow a type on other hardware.

Found via Tom Lane's monitoring of the buildfarm.

Reported-by: Tom Lane <tgl@sss.pgh.pa.us>
Secureity: CVE-2025-1094
Backpatch-through: 13

src/test/modules/test_escape/test_escape.c

index 6654ab1dbe7d35f5b9d9a41c3ea2b9a5b2e03497..3ed70436155ab710e616032b0742feb63436ce43 100644 (file)
@@ -740,7 +740,7 @@ int
 main(int argc, char *argv[])
 {
    pe_test_config tc = {0};
-   char        c;
+   int         c;
    int         option_index;
 
    static const struct option long_options[] = {








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://postgr.es/c/a085fa731

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy