[Expat-checkins] expat/lib xmlparse.c,1.87,1.88

Karl Waclawek kwaclaw@users.sourceforge.net
Sat, 28 Sep 2002 07:47:37 -0700


Update of /cvsroot/expat/expat/lib
In directory usw-pr-cvs1:/tmp/cvs-serv7157

Modified Files:
	xmlparse.c 
Log Message:
Fix for bug #615606.

Index: xmlparse.c
===================================================================
RCS file: /cvsroot/expat/expat/lib/xmlparse.c,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -d -r1.87 -r1.88
--- xmlparse.c	20 Sep 2002 03:42:43 -0000	1.87
+++ xmlparse.c	28 Sep 2002 14:47:34 -0000	1.88
@@ -1670,8 +1670,12 @@
       char *temp = REALLOC(tag->buf, bufSize);
       if (temp == NULL)
         return XML_FALSE;
+      /* if tag->name.str points to tag->buf (i.e. when namespace
+         processing is off) then we have to update it 
+      */
+      if (tag->name.str == (XML_Char *)tag->buf)
+        tag->name.str = (XML_Char *)temp;
       tag->buf = temp;
-      tag->name.str = (XML_Char *)temp;
       tag->bufEnd = temp + bufSize;
       rawNameBuf = temp + nameLen;
     }