[Expat-checkins] expat/lib xmlparse.c,1.163,1.164
Karl Waclawek
kwaclaw at users.sourceforge.net
Tue Sep 29 04:49:18 CEST 2009
Update of /cvsroot/expat/expat/lib
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv27575
Modified Files:
xmlparse.c
Log Message:
- Fix for issue # 2855609 & 2518079.
- Some code cosmetics.
Index: xmlparse.c
===================================================================
RCS file: /cvsroot/expat/expat/lib/xmlparse.c,v
retrieving revision 1.163
retrieving revision 1.164
diff -u -d -r1.163 -r1.164
--- xmlparse.c 31 Jan 2009 06:21:09 -0000 1.163
+++ xmlparse.c 29 Sep 2009 02:49:16 -0000 1.164
@@ -1513,15 +1513,11 @@
: (char *)REALLOC(buffer, len * 2));
if (temp == NULL) {
errorCode = XML_ERROR_NO_MEMORY;
- return XML_STATUS_ERROR;
- }
- buffer = temp;
- if (!buffer) {
- errorCode = XML_ERROR_NO_MEMORY;
eventPtr = eventEndPtr = NULL;
processor = errorProcessor;
return XML_STATUS_ERROR;
}
+ buffer = temp;
bufferLim = buffer + len * 2;
}
memcpy(buffer, end, nLeftOver);
@@ -1672,6 +1668,8 @@
bufferPtr = buffer = newBuf;
#endif /* not defined XML_CONTEXT_BYTES */
}
+ eventPtr = eventEndPtr = NULL;
+ positionPtr = NULL;
}
return bufferEnd;
}
@@ -4949,7 +4947,7 @@
if (!entity->textPtr) {
if (enc == encoding)
eventPtr = ptr;
- return XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF;
+ return XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF;
}
else {
enum XML_Error result;
More information about the Expat-checkins
mailing list