aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-01-09 13:02:54 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2016-01-09 13:03:10 -0500
commit4e1ccc7e449aed32e63e53bc36e023f9259f2e09 (patch)
treea4aa7dfb33e11833142a3a1021feb77f19fd51c5 /src
parenta66c1fcdd7e4291561c5cdebc1d02784050260e2 (diff)
downloadpostgresql-4e1ccc7e449aed32e63e53bc36e023f9259f2e09.tar.gz
postgresql-4e1ccc7e449aed32e63e53bc36e023f9259f2e09.zip
Add STRICT to some C functions created by the regression tests.
These functions readily crash when passed a NULL input value. The tests themselves do not pass NULL values to them; but when the regression database is used as a basis for fuzz testing, they cause a lot of noise. Also, if someone were to leave a regression database lying about in a production installation, these would create a minor security hazard. Andreas Seltenreich
Diffstat (limited to 'src')
-rw-r--r--src/test/regress/input/create_function_2.source12
-rw-r--r--src/test/regress/output/create_function_2.source12
2 files changed, 12 insertions, 12 deletions
diff --git a/src/test/regress/input/create_function_2.source b/src/test/regress/input/create_function_2.source
index 1b013aedcbd..c5185597775 100644
--- a/src/test/regress/input/create_function_2.source
+++ b/src/test/regress/input/create_function_2.source
@@ -74,32 +74,32 @@ CREATE FUNCTION user_relns()
CREATE FUNCTION pt_in_widget(point, widget)
RETURNS bool
AS '@libdir@/regress@DLSUFFIX@'
- LANGUAGE C;
+ LANGUAGE C STRICT;
CREATE FUNCTION overpaid(emp)
RETURNS bool
AS '@libdir@/regress@DLSUFFIX@'
- LANGUAGE C;
+ LANGUAGE C STRICT;
CREATE FUNCTION boxarea(box)
RETURNS float8
AS '@libdir@/regress@DLSUFFIX@'
- LANGUAGE C;
+ LANGUAGE C STRICT;
CREATE FUNCTION interpt_pp(path, path)
RETURNS point
AS '@libdir@/regress@DLSUFFIX@'
- LANGUAGE C;
+ LANGUAGE C STRICT;
CREATE FUNCTION reverse_name(name)
RETURNS name
AS '@libdir@/regress@DLSUFFIX@'
- LANGUAGE C;
+ LANGUAGE C STRICT;
CREATE FUNCTION oldstyle_length(int4, text)
RETURNS int4
AS '@libdir@/regress@DLSUFFIX@'
- LANGUAGE C;
+ LANGUAGE C; -- intentionally not strict
--
-- Function dynamic loading
diff --git a/src/test/regress/output/create_function_2.source b/src/test/regress/output/create_function_2.source
index 98e1c297337..829393243e0 100644
--- a/src/test/regress/output/create_function_2.source
+++ b/src/test/regress/output/create_function_2.source
@@ -58,27 +58,27 @@ CREATE FUNCTION user_relns()
CREATE FUNCTION pt_in_widget(point, widget)
RETURNS bool
AS '@libdir@/regress@DLSUFFIX@'
- LANGUAGE C;
+ LANGUAGE C STRICT;
CREATE FUNCTION overpaid(emp)
RETURNS bool
AS '@libdir@/regress@DLSUFFIX@'
- LANGUAGE C;
+ LANGUAGE C STRICT;
CREATE FUNCTION boxarea(box)
RETURNS float8
AS '@libdir@/regress@DLSUFFIX@'
- LANGUAGE C;
+ LANGUAGE C STRICT;
CREATE FUNCTION interpt_pp(path, path)
RETURNS point
AS '@libdir@/regress@DLSUFFIX@'
- LANGUAGE C;
+ LANGUAGE C STRICT;
CREATE FUNCTION reverse_name(name)
RETURNS name
AS '@libdir@/regress@DLSUFFIX@'
- LANGUAGE C;
+ LANGUAGE C STRICT;
CREATE FUNCTION oldstyle_length(int4, text)
RETURNS int4
AS '@libdir@/regress@DLSUFFIX@'
- LANGUAGE C;
+ LANGUAGE C; -- intentionally not strict
--
-- Function dynamic loading
--