]> granicus.if.org Git - postgresql/commitdiff
Fixed segfault in forward definition parsing.
authorMichael Meskes <meskes@postgresql.org>
Mon, 2 Jun 2003 15:38:02 +0000 (15:38 +0000)
committerMichael Meskes <meskes@postgresql.org>
Mon, 2 Jun 2003 15:38:02 +0000 (15:38 +0000)
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/preproc/preproc.y

index 03561b67ca49531be9f8913cdf17e28db71d0bd6..dfbed06fee53e53b9bae107937f143ed85c677cf 100644 (file)
@@ -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
index e58a749b04d37caaed6cac5dc356a17a1cb288b6..e06ca1fe02a7ba52d93a93df560890d5c47c171f 100644 (file)
@@ -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? */