expat/lib xmlparse.c,1.91,1.92

"Fred L. Drake" <[email protected]>
Newsgroups gmane.text.xml.expat.cvs
Message-ID <[email protected]>
Update of /cvsroot/expat/expat/lib
In directory usw-pr-cvs1:/tmp/cvs-serv11082/lib

Modified Files:
	xmlparse.c 
Log Message:
SF bug #620343: segfault: bad API/callback interaction
The start-namespace-decl callback can set the start-element callback to
NULL, but Expat tried to call it anyway.


Index: xmlparse.c
===================================================================
RCS file: /cvsroot/expat/expat/lib/xmlparse.c,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -d -r1.91 -r1.92
--- xmlparse.c	3 Oct 2002 19:41:26 -0000	1.91
+++ xmlparse.c	8 Oct 2002 17:04:55 -0000	1.92
@@ -2075,8 +2075,9 @@
           result = storeAtts(parser, enc, s, &(tag->name), &(tag->bindings));
           if (result)
             return result;
-          startElementHandler(handlerArg, tag->name.str,
-                              (const XML_Char **)atts);
+          if (startElementHandler)
+            startElementHandler(handlerArg, tag->name.str,
+                                (const XML_Char **)atts);
         }
         else if (defaultHandler)
           reportDefault(parser, enc, s, next);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.