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

Commitc204dcb

Browse files
committed
Merge branch 'fix_CVE_2020_14350'
2 parentsbfa1978 +f0e8304 commitc204dcb

File tree

4 files changed

+91
-8
lines changed

4 files changed

+91
-8
lines changed

‎Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ OBJS = src/shared_ispell.o
66
EXTENSION = shared_ispell
77
DATA = shared_ispell--1.1.0.sql
88

9-
REGRESS = shared_ispell
9+
REGRESS =securityshared_ispell
1010

1111
EXTRA_REGRESS_OPTS=--temp-config=$(top_srcdir)/$(subdir)/postgresql.conf
1212

‎expected/security.out

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
create type si_dicts_result as (dict_name VARCHAR, affix_name VARCHAR, words INT, affixes INT, bytes INT);
2+
create function shared_ispell_dicts( OUT dict_name VARCHAR, OUT affix_name VARCHAR, OUT words INT, OUT affixes INT, OUT bytes INT)
3+
returns SETOF record as $$
4+
declare
5+
qString varchar(4000);
6+
rec si_dicts_result;
7+
begin
8+
qString := 'select * from shared_ispell_dicts()';
9+
for rec in execute qString loop
10+
return NEXT;
11+
end loop;
12+
return;
13+
end
14+
$$ language plpgsql;
15+
create extension shared_ispell;
16+
ERROR: function "shared_ispell_dicts" already exists with same argument types
17+
drop extension if exists shared_ispell;
18+
NOTICE: extension "shared_ispell" does not exist, skipping
19+
drop type si_dicts_result;
20+
drop function shared_ispell_dicts;
21+
create type si_stoplists_result as (stop_name VARCHAR, words INT, bytes INT);
22+
create function shared_ispell_stoplists(OUT stop_name VARCHAR, OUT words INT, OUT bytes INT)
23+
returns SETOF record as $$
24+
declare
25+
rec si_stoplists_result;
26+
qString varchar(4000);
27+
begin
28+
qString := 'select * from shared_ispell_stoplists()';
29+
for rec in execute qString loop
30+
return NEXT;
31+
end loop;
32+
return;
33+
end
34+
$$ language plpgsql;
35+
create extension shared_ispell;
36+
ERROR: function "shared_ispell_stoplists" already exists with same argument types
37+
drop extension if exists shared_ispell;
38+
NOTICE: extension "shared_ispell" does not exist, skipping
39+
drop type si_stoplists_result;
40+
drop function shared_ispell_stoplists;

‎shared_ispell--1.1.0.sql

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
1-
CREATEOR REPLACEFUNCTIONshared_ispell_init(internal)
1+
CREATEFUNCTIONshared_ispell_init(internal)
22
RETURNS internal
33
AS'MODULE_PATHNAME','dispell_init'
44
LANGUAGE C IMMUTABLE;
55

6-
CREATEOR REPLACEFUNCTIONshared_ispell_lexize(internal,internal,internal,internal)
6+
CREATEFUNCTIONshared_ispell_lexize(internal,internal,internal,internal)
77
RETURNS internal
88
AS'MODULE_PATHNAME','dispell_lexize'
99
LANGUAGE C IMMUTABLE;
1010

11-
CREATEOR REPLACEFUNCTIONshared_ispell_reset()
11+
CREATEFUNCTIONshared_ispell_reset()
1212
RETURNS void
1313
AS'MODULE_PATHNAME','dispell_reset'
1414
LANGUAGE C IMMUTABLE;
1515

16-
CREATEOR REPLACEFUNCTIONshared_ispell_mem_used()
16+
CREATEFUNCTIONshared_ispell_mem_used()
1717
RETURNSinteger
1818
AS'MODULE_PATHNAME','dispell_mem_used'
1919
LANGUAGE C IMMUTABLE;
2020

21-
CREATEOR REPLACEFUNCTIONshared_ispell_mem_available()
21+
CREATEFUNCTIONshared_ispell_mem_available()
2222
RETURNSinteger
2323
AS'MODULE_PATHNAME','dispell_mem_available'
2424
LANGUAGE C IMMUTABLE;
2525

26-
CREATEOR REPLACEFUNCTIONshared_ispell_dicts( OUT dict_nameVARCHAR, OUT affix_nameVARCHAR, OUT wordsINT, OUT affixesINT, OUT bytesINT)
26+
CREATEFUNCTIONshared_ispell_dicts( OUT dict_nameVARCHAR, OUT affix_nameVARCHAR, OUT wordsINT, OUT affixesINT, OUT bytesINT)
2727
RETURNS SETOF record
2828
AS'MODULE_PATHNAME','dispell_list_dicts'
2929
LANGUAGE C IMMUTABLE;
3030

31-
CREATEOR REPLACEFUNCTIONshared_ispell_stoplists( OUT stop_nameVARCHAR, OUT wordsINT, OUT bytesINT)
31+
CREATEFUNCTIONshared_ispell_stoplists( OUT stop_nameVARCHAR, OUT wordsINT, OUT bytesINT)
3232
RETURNS SETOF record
3333
AS'MODULE_PATHNAME','dispell_list_stoplists'
3434
LANGUAGE C IMMUTABLE;

‎sql/security.sql

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
createtypesi_dicts_resultas (dict_nameVARCHAR, affix_nameVARCHAR, wordsINT, affixesINT, bytesINT);
2+
3+
createfunctionshared_ispell_dicts( OUT dict_nameVARCHAR, OUT affix_nameVARCHAR, OUT wordsINT, OUT affixesINT, OUT bytesINT)
4+
returns SETOF recordas $$
5+
declare
6+
qStringvarchar(4000);
7+
rec si_dicts_result;
8+
begin
9+
qString :='select * from shared_ispell_dicts()';
10+
for recin execute qString loop
11+
return NEXT;
12+
end loop;
13+
return;
14+
end
15+
$$ language plpgsql;
16+
17+
create extension shared_ispell;
18+
19+
drop extension if exists shared_ispell;
20+
droptype si_dicts_result;
21+
dropfunction shared_ispell_dicts;
22+
23+
createtypesi_stoplists_resultas (stop_nameVARCHAR, wordsINT, bytesINT);
24+
25+
createfunctionshared_ispell_stoplists(OUT stop_nameVARCHAR, OUT wordsINT, OUT bytesINT)
26+
returns SETOF recordas $$
27+
declare
28+
rec si_stoplists_result;
29+
qStringvarchar(4000);
30+
begin
31+
qString :='select * from shared_ispell_stoplists()';
32+
for recin execute qString loop
33+
return NEXT;
34+
end loop;
35+
return;
36+
end
37+
$$ language plpgsql;
38+
39+
create extension shared_ispell;
40+
41+
drop extension if exists shared_ispell;
42+
droptype si_stoplists_result;
43+
dropfunction shared_ispell_stoplists;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp