aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2025-02-10 12:09:23 -0500
committerAndres Freund <andres@anarazel.de>2025-02-10 12:12:58 -0500
commita085fa73169d6c0df079cfa4ddfeade812368a64 (patch)
tree4ba862aa23e1bf8655f857f0c9c051d3637fa3b9
parent57bda2508f1c666fd18f2b233823b7c98308226b (diff)
downloadpostgresql-a085fa73169d6c0df079cfa4ddfeade812368a64.tar.gz
postgresql-a085fa73169d6c0df079cfa4ddfeade812368a64.zip
Fix type in test_escape test
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> Security: CVE-2025-1094 Backpatch-through: 13
-rw-r--r--src/test/modules/test_escape/test_escape.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/modules/test_escape/test_escape.c b/src/test/modules/test_escape/test_escape.c
index 6654ab1dbe7..3ed70436155 100644
--- a/src/test/modules/test_escape/test_escape.c
+++ b/src/test/modules/test_escape/test_escape.c
@@ -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[] = {