git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 32c3400)
Fix type in test_escape test
2025年2月10日 17:09:23 +0000 (12:09 -0500)
2025年2月10日 17:12:14 +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>
Security: CVE-2025-1094
Backpatch-through: 13


diff --git a/src/test/modules/test_escape/test_escape.c b/src/test/modules/test_escape/test_escape.c
index 6654ab1dbe7d35f5b9d9a41c3ea2b9a5b2e03497..3ed70436155ab710e616032b0742feb63436ce43 100644 (file)
--- 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[] = {
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /