[Expat-checkins] expat/doc reference.html,1.65,1.66

Karl Waclawek kwaclaw at users.sourceforge.net
Mon Nov 28 21:00:59 CET 2005


Update of /cvsroot/expat/expat/doc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4969

Modified Files:
	reference.html 
Log Message:
Added a note about possible integer overflow when using large input buffers.

Index: reference.html
===================================================================
RCS file: /cvsroot/expat/expat/doc/reference.html,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- reference.html	30 Jan 2005 05:44:46 -0000	1.65
+++ reference.html	28 Nov 2005 20:00:50 -0000	1.66
@@ -984,14 +984,22 @@
 <p>To state the obvious: the three parsing functions <code><a href=
 "#XML_Parse" >XML_Parse</a></code>, <code><a href= "#XML_ParseBuffer">
 XML_ParseBuffer</a></code> and <code><a href= "#XML_GetBuffer">
-XML_GetBuffer</a></code> must not be
-called from within a handler unless they operate on a separate parser
-instance, that is, one that did not call the handler. For example, it
-is OK to call the parsing functions from within an
-<code>XML_ExternalEntityRefHandler</code>, if they apply to the parser
-created by <code><a href= "#XML_ExternalEntityParserCreate"
+XML_GetBuffer</a></code> must not be called from within a handler
+unless they operate on a separate parser instance, that is, one that
+did not call the handler. For example, it is OK to call the parsing
+functions from within an <code>XML_ExternalEntityRefHandler</code>,
+if they apply to the parser created by
+<code><a href= "#XML_ExternalEntityParserCreate"
 >XML_ExternalEntityParserCreate</a></code>.</p>
 
+<p>Note: the <code>len</code> argument passed to these functions
+should be considerably less than the maximum value for an integer,
+as it could create an integer overflow situation if the added
+lengths of a buffer and the unprocessed portion of the previous buffer
+exceed the maximum integer value. Input data at the end of a buffer
+will remain unprocessed if it is part of an XML token for which the
+end is not part of that buffer.</p>
+
 <pre class="fcndec" id="XML_Parse">
 enum XML_Status XMLCALL
 XML_Parse(XML_Parser p,



More information about the Expat-checkins mailing list