Update of /cvsroot/monetdb/pathfinder/compiler/schema
In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv1589

Modified Files:
      Tag: Nov2009
        import.c 
Log Message:
Check that map_closing_tag doesn't return HOLE.
Found by Coverity.


Index: import.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/schema/import.c,v
retrieving revision 1.30.6.1
retrieving revision 1.30.6.2
diff -u -d -r1.30.6.1 -r1.30.6.2
--- import.c    7 Jan 2010 15:17:47 -0000       1.30.6.1
+++ import.c    11 Jan 2010 09:55:45 -0000      1.30.6.2
@@ -794,7 +794,7 @@
 }
 
 /**
- * Callback invoked whenever the see a closing tag </t>.
+ * Callback invoked whenever we see a closing tag </t>.
  *
  * @param SAX parser context
  * @param t tag name
@@ -811,7 +811,7 @@
     closing_tag = map_closing_tag (ctx, (char *) t);
 
     /* perform type mapping DFA transition */
-    if (dfa[state][closing_tag] == HOLE) {
+    if (closing_tag == HOLE || dfa[state][closing_tag] == HOLE) {
         PFinfo (OOPS_SCHEMAIMPORT, "unexpected </%s>", t);
         xmlParserError (ctx, "\n");
         PFoops (OOPS_SCHEMAIMPORT, "check schema well-formedness");


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to