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

Commit6c2925b

Browse files
committed
Prevent empty queries from crashing server.
1 parent02db1f5 commit6c2925b

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

‎src/backend/parser/parser.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
*
88
* IDENTIFICATION
9-
* $Header: /cvsroot/pgsql/src/backend/parser/parser.c,v 1.11 1996/11/13 20:49:07 scrappy Exp $
9+
* $Header: /cvsroot/pgsql/src/backend/parser/parser.c,v 1.12 1996/11/25 03:03:48 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -69,10 +69,8 @@ parser(char *str, Oid *typev, int nargs)
6969
init_io();
7070

7171
/* Set things up to read from the string, if there is one */
72-
if (strlen(str)!=0) {
73-
parseString= (char*)palloc(strlen(str)+1);
74-
memmove(parseString,str,strlen(str)+1);
75-
}
72+
parseString= (char*)palloc(strlen(str)+1);
73+
memmove(parseString,str,strlen(str)+1);
7674

7775
parser_init(typev,nargs);
7876
yyresult=yyparse();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp