1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-05 02:22:28 +03:00

- Fixed segfault due to missing check for variable declaration.

- Added check for multidimensional array usage.
This commit is contained in:
Michael Meskes
2004-03-04 07:32:02 +00:00
parent c934cf1e96
commit f3c6d592d2
3 changed files with 53 additions and 14 deletions

View File

@@ -218,7 +218,7 @@ find_variable(char *name)
{
/*
* We don't care about what's inside the array braces so just
* eat up the character
* eat up the characters
*/
for (count = 1, end = next + 1; count; end++)
{
@@ -242,6 +242,11 @@ find_variable(char *name)
*next = '\0';
p = find_simple(name);
if (p == NULL)
{
snprintf(errortext, sizeof(errortext), "The variable %s is not declared", name);
mmerror(PARSE_ERROR, ET_FATAL, errortext);
}
*next = c;
switch (p->type->u.element->type)
{