]> granicus.if.org Git - libexpat/commitdiff
Applied patch #618199.
authorKarl Waclawek <kwaclaw@users.sourceforge.net>
Thu, 3 Oct 2002 19:41:26 +0000 (19:41 +0000)
committerKarl Waclawek <kwaclaw@users.sourceforge.net>
Thu, 3 Oct 2002 19:41:26 +0000 (19:41 +0000)
expat/lib/xmlparse.c

index 160ea2abcfa72ab10ee89ae274beb33aa978fee3..602108d3dbe53e8da81de96357bb8e257b7b2299 100644 (file)
@@ -1710,11 +1710,17 @@ storeRawNames(XML_Parser parser)
       char *temp = REALLOC(tag->buf, bufSize);
       if (temp == NULL)
         return XML_FALSE;
-      /* if tag->name.str points to tag->buf (i.e. when namespace
+      /* if tag->name.str points to tag->buf (only 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;
+      /* if tag->name.localPart is set (when namespace processing is on)
+         then update it as well, since it will always point into tag-buf
+      */
+      if (tag->name.localPart)
+        tag->name.localPart = (XML_Char *)temp + (tag->name.localPart -
+                                                  (XML_Char *)tag->buf);
       tag->buf = temp;
       tag->bufEnd = temp + bufSize;
       rawNameBuf = temp + nameLen;