Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit831c22b

Browse files
committed
Add STRICT to some C functions created by the regression tests.
These functions readily crash when passed a NULL input value. The teststhemselves do not pass NULL values to them; but when the regressiondatabase 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 aproduction installation, these would create a minor security hazard.Andreas Seltenreich
1 parentaa06259 commit831c22b

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

‎src/test/regress/input/create_function_2.source

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,32 +74,32 @@ CREATE FUNCTION user_relns()
7474
CREATE FUNCTION pt_in_widget(point, widget)
7575
RETURNS bool
7676
AS '@libdir@/regress@DLSUFFIX@'
77-
LANGUAGE C;
77+
LANGUAGE C STRICT;
7878

7979
CREATE FUNCTION overpaid(emp)
8080
RETURNS bool
8181
AS '@libdir@/regress@DLSUFFIX@'
82-
LANGUAGE C;
82+
LANGUAGE C STRICT;
8383

8484
CREATE FUNCTION boxarea(box)
8585
RETURNS float8
8686
AS '@libdir@/regress@DLSUFFIX@'
87-
LANGUAGE C;
87+
LANGUAGE C STRICT;
8888

8989
CREATE FUNCTION interpt_pp(path, path)
9090
RETURNS point
9191
AS '@libdir@/regress@DLSUFFIX@'
92-
LANGUAGE C;
92+
LANGUAGE C STRICT;
9393

9494
CREATE FUNCTION reverse_name(name)
9595
RETURNS name
9696
AS '@libdir@/regress@DLSUFFIX@'
97-
LANGUAGE C;
97+
LANGUAGE C STRICT;
9898

9999
CREATE FUNCTION oldstyle_length(int4, text)
100100
RETURNS int4
101101
AS '@libdir@/regress@DLSUFFIX@'
102-
LANGUAGE C;
102+
LANGUAGE C; -- intentionally not strict
103103

104104
--
105105
-- Function dynamic loading

‎src/test/regress/output/create_function_2.source

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,27 +58,27 @@ CREATE FUNCTION user_relns()
5858
CREATE FUNCTION pt_in_widget(point, widget)
5959
RETURNS bool
6060
AS '@libdir@/regress@DLSUFFIX@'
61-
LANGUAGE C;
61+
LANGUAGE C STRICT;
6262
CREATE FUNCTION overpaid(emp)
6363
RETURNS bool
6464
AS '@libdir@/regress@DLSUFFIX@'
65-
LANGUAGE C;
65+
LANGUAGE C STRICT;
6666
CREATE FUNCTION boxarea(box)
6767
RETURNS float8
6868
AS '@libdir@/regress@DLSUFFIX@'
69-
LANGUAGE C;
69+
LANGUAGE C STRICT;
7070
CREATE FUNCTION interpt_pp(path, path)
7171
RETURNS point
7272
AS '@libdir@/regress@DLSUFFIX@'
73-
LANGUAGE C;
73+
LANGUAGE C STRICT;
7474
CREATE FUNCTION reverse_name(name)
7575
RETURNS name
7676
AS '@libdir@/regress@DLSUFFIX@'
77-
LANGUAGE C;
77+
LANGUAGE C STRICT;
7878
CREATE FUNCTION oldstyle_length(int4, text)
7979
RETURNS int4
8080
AS '@libdir@/regress@DLSUFFIX@'
81-
LANGUAGE C;
81+
LANGUAGE C; -- intentionally not strict
8282
--
8383
-- Function dynamic loading
8484
--

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp