diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2015-10-05 12:19:15 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2015-10-05 12:19:15 -0400 |
commit | 57b02827f3c086695e82358d7466b0168c64d3b9 (patch) | |
tree | d2cccb6e2f7912cbc98c170eee723500d9b7c3a8 | |
parent | 921c18c150b202a1ada974a3e2b963f23f2b0604 (diff) |
Fix insufficiently-portable regression test case.
Some of the buildfarm members are evidently miserly enough of stack space
to pass the originally-committed form of this test. Increase the
requirement 10X to hopefully ensure that it fails as-expected everywhere.
Security: CVE-2015-5289
-rw-r--r-- | src/test/regress/expected/json.out | 4 | ||||
-rw-r--r-- | src/test/regress/expected/json_1.out | 4 | ||||
-rw-r--r-- | src/test/regress/sql/json.sql | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/test/regress/expected/json.out b/src/test/regress/expected/json.out index a43c9e01bef..2a82aef6ba9 100644 --- a/src/test/regress/expected/json.out +++ b/src/test/regress/expected/json.out @@ -233,10 +233,10 @@ DETAIL: Expected string, but found "3". CONTEXT: JSON data, line 1: {"abc":1,3... -- Recursion. SET max_stack_depth = '100kB'; -SELECT repeat('[', 1000)::json; +SELECT repeat('[', 10000)::json; ERROR: stack depth limit exceeded HINT: Increase the configuration parameter "max_stack_depth" (currently 100kB), after ensuring the platform's stack depth limit is adequate. -SELECT repeat('{"a":', 1000)::json; +SELECT repeat('{"a":', 10000)::json; ERROR: stack depth limit exceeded HINT: Increase the configuration parameter "max_stack_depth" (currently 100kB), after ensuring the platform's stack depth limit is adequate. RESET max_stack_depth; diff --git a/src/test/regress/expected/json_1.out b/src/test/regress/expected/json_1.out index 075c3f0e0fa..e43118360ad 100644 --- a/src/test/regress/expected/json_1.out +++ b/src/test/regress/expected/json_1.out @@ -233,10 +233,10 @@ DETAIL: Expected string, but found "3". CONTEXT: JSON data, line 1: {"abc":1,3... -- Recursion. SET max_stack_depth = '100kB'; -SELECT repeat('[', 1000)::json; +SELECT repeat('[', 10000)::json; ERROR: stack depth limit exceeded HINT: Increase the configuration parameter "max_stack_depth" (currently 100kB), after ensuring the platform's stack depth limit is adequate. -SELECT repeat('{"a":', 1000)::json; +SELECT repeat('{"a":', 10000)::json; ERROR: stack depth limit exceeded HINT: Increase the configuration parameter "max_stack_depth" (currently 100kB), after ensuring the platform's stack depth limit is adequate. RESET max_stack_depth; diff --git a/src/test/regress/sql/json.sql b/src/test/regress/sql/json.sql index f1f898418dd..73993adcfef 100644 --- a/src/test/regress/sql/json.sql +++ b/src/test/regress/sql/json.sql @@ -47,8 +47,8 @@ SELECT '{"abc":1,3}'::json; -- ERROR, no value -- Recursion. SET max_stack_depth = '100kB'; -SELECT repeat('[', 1000)::json; -SELECT repeat('{"a":', 1000)::json; +SELECT repeat('[', 10000)::json; +SELECT repeat('{"a":', 10000)::json; RESET max_stack_depth; -- Miscellaneous stuff. |