diff --git a/src/interfaces/ecpg/ChangeLog b/src/interfaces/ecpg/ChangeLog index 03561b67ca..dfbed06fee 100644 --- a/src/interfaces/ecpg/ChangeLog +++ b/src/interfaces/ecpg/ChangeLog @@ -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 diff --git a/src/interfaces/ecpg/preproc/preproc.y b/src/interfaces/ecpg/preproc/preproc.y index e58a749b04..e06ca1fe02 100644 --- a/src/interfaces/ecpg/preproc/preproc.y +++ b/src/interfaces/ecpg/preproc/preproc.y @@ -1,4 +1,4 @@ -/* $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? */