Skip to content
Snippets Groups Projects
Commit 45eebaf8 authored by Michael Meskes's avatar Michael Meskes
Browse files

Fixed segfault in forward definition parsing.

parent 21b8e0ac
Branches
Tags
No related merge requests found
......@@ -1469,6 +1469,10 @@ Fri May 30 15:19:39 CEST 2003
- Implemented prototype describe function.
- Some minor cleanup/bug fixing.
Mon Jun 2 17:36:03 CEST 2003
- Fixed segfault in forward definition parsing.
- Set ecpg version to 2.12.0.
- Set ecpg library to 3.4.2.
- Set pgtypes library to 1.0.0
......
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.227 2003/05/30 13:22:02 meskes Exp $ */
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.228 2003/06/02 15:38:02 meskes Exp $ */
/* Copyright comment */
%{
......@@ -4437,7 +4437,7 @@ single_vt_type: common_type
/* this is for named structs/unions */
char *name;
struct typedefs *this;
bool forward = (strcmp($1.symbol, forward_name) == 0 && strcmp($1.su, "struct") == 0);
bool forward = (forward_name != NULL && strcmp($1.symbol, forward_name) == 0 && strcmp($1.su, "struct") == 0);
name = cat2_str($1.su, $1.symbol);
/* Do we have a forward definition? */
......@@ -4791,7 +4791,7 @@ var_type: common_type
/* this is for named structs/unions */
char *name;
struct typedefs *this;
bool forward = (strcmp($1.symbol, forward_name) == 0 && strcmp($1.su, "struct") == 0);
bool forward = (forward_name != NULL && strcmp($1.symbol, forward_name) == 0 && strcmp($1.su, "struct") == 0);
name = cat2_str($1.su, $1.symbol);
/* Do we have a forward definition? */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment