Added missing braces to prevent a segfault after usage of an undeclared cursor.
This commit is contained in:
parent
6bf44d51ea
commit
4b98d423d7
@ -2035,5 +2035,10 @@ Mo Jun 26 11:05:25 CEST 2006
|
|||||||
|
|
||||||
- Added some more coverity report patches send in by Joachim Wieland
|
- Added some more coverity report patches send in by Joachim Wieland
|
||||||
<joe@mcknight.de>.
|
<joe@mcknight.de>.
|
||||||
|
|
||||||
|
Mo Jun 26 16:08:23 CEST 2006
|
||||||
|
|
||||||
|
- Added missing braces to prevent a segfault after usage of an
|
||||||
|
undeclared cursor.
|
||||||
- Set ecpg library version to 5.2.
|
- Set ecpg library version to 5.2.
|
||||||
- Set ecpg version to 4.2.1.
|
- Set ecpg version to 4.2.1.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.324 2006/06/06 11:31:55 meskes Exp $ */
|
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.325 2006/06/26 14:12:02 meskes Exp $ */
|
||||||
|
|
||||||
/* Copyright comment */
|
/* Copyright comment */
|
||||||
%{
|
%{
|
||||||
@ -292,6 +292,7 @@ add_additional_variables(char *name, bool insert)
|
|||||||
mmerror(PARSE_ERROR, ET_ERROR, "trying to access an undeclared cursor %s\n", name);
|
mmerror(PARSE_ERROR, ET_ERROR, "trying to access an undeclared cursor %s\n", name);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (insert)
|
if (insert)
|
||||||
{
|
{
|
||||||
/* add all those input variables that were given earlier
|
/* add all those input variables that were given earlier
|
||||||
@ -837,10 +838,12 @@ stmt: AlterDatabaseStmt { output_statement($1, 0, connection); }
|
|||||||
struct cursor *ptr;
|
struct cursor *ptr;
|
||||||
|
|
||||||
if ((ptr = add_additional_variables($1, true)) != NULL)
|
if ((ptr = add_additional_variables($1, true)) != NULL)
|
||||||
|
{
|
||||||
output_statement(mm_strdup(ptr->command), 0,
|
output_statement(mm_strdup(ptr->command), 0,
|
||||||
ptr->connection ? mm_strdup(ptr->connection) : NULL);
|
ptr->connection ? mm_strdup(ptr->connection) : NULL);
|
||||||
ptr->opened = true;
|
ptr->opened = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
| ECPGPrepare
|
| ECPGPrepare
|
||||||
{
|
{
|
||||||
if (connection)
|
if (connection)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user