Skip to content
Snippets Groups Projects
Commit 6c2925b8 authored by Bruce Momjian's avatar Bruce Momjian
Browse files

Prevent empty queries from crashing server.

parent 02db1f58
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parser.c,v 1.11 1996/11/13 20:49:07 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parser.c,v 1.12 1996/11/25 03:03:48 momjian Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -69,10 +69,8 @@ parser(char *str, Oid *typev, int nargs)
init_io();
/* Set things up to read from the string, if there is one */
if (strlen(str) != 0) {
parseString = (char *) palloc(strlen(str) + 1);
memmove(parseString,str,strlen(str)+1);
}
parseString = (char *) palloc(strlen(str) + 1);
memmove(parseString,str,strlen(str)+1);
parser_init(typev, nargs);
yyresult = yyparse();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment