diff options
author | Andres Freund <andres@anarazel.de> | 2025-02-10 12:09:23 -0500 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2025-02-10 12:12:14 -0500 |
commit | 979205e47bdc094787b10142e84a7634f7c720dd (patch) | |
tree | fccbddb1d9058f1b581f0bad2188b55c8fa52499 /src | |
parent | 32c34006b24bf7432c2d0f47da10492de7253d52 (diff) | |
download | postgresql-979205e47bdc094787b10142e84a7634f7c720dd.tar.gz postgresql-979205e47bdc094787b10142e84a7634f7c720dd.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
Diffstat (limited to 'src')
-rw-r--r-- | src/test/modules/test_escape/test_escape.c | 2 |
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[] = { |