Fix potential infinite loop in snprintf() emulation code (STR #25)

This commit is contained in:
Michael R Sweet 2005-08-10 18:51:31 +00:00
parent cc95be7bed
commit b11473f8f3
4 changed files with 27 additions and 9 deletions

View File

@ -1,8 +1,10 @@
CHANGES - 08/05/2005
CHANGES - 08/10/2005
--------------------
CHANGES IN Mini-XML 2.2.4
- The mxml_vsnprintf() function could get in an infinite
loop on a buffer overflow (STR #25)
- Added new mxmlNewCDATA() and mxmlSetCDATA() functions
to create and set CDATA nodes, which are really just
special element nodes.

4
README
View File

@ -1,11 +1,11 @@
README - 05/19/2005
README - 08/10/2005
-------------------
INTRODUCTION
This README file describes the Mini-XML library version
2.2.2.
2.2.4.
Mini-XML is a small XML parsing library that you can use to
read XML and XML-like data files in your application without

View File

@ -3,14 +3,32 @@
<h1 align='right'><a name='RELNOTES'>B - Release Notes</a></h1>
<h2>Changes in Mini-XML 2.2.3</h2>
<h2>Changes in Mini-XML 2.2.4</h2>
<ul>
<li>The mxml_vsnprintf() function could get in an infinite
loop on a buffer overflow (STR #25)</li>
<li>Added new mxmlNewCDATA() and mxmlSetCDATA() functions
to create and set CDATA nodes, which are really just
special element nodes.</li>
</ul>
<h2>Changes in Mini-XML 2.2.3</h2>
<ul>
<li>Added new MXML_IGNORE type and MXML_IGNORE_CB
callback to ignore non-element nodes (i.e.
whitespace)</li>
<li>mxmlLoad*() did not treat custom data as opaque, so
whitespace characters would be lost.</li>
</ul>
@ -18,10 +36,6 @@
<ul>
<li>Added new MXML_IGNORE type and MXML_IGNORE_CB
callback to ignore non-element nodes (i.e.
whitespace)</li>
<li>mxmlLoad*() did not treat custom data as opaque, so
whitespace characters would be lost.</li>

View File

@ -383,7 +383,9 @@ mxml_vsnprintf(char *buffer, /* O - Output buffer */
bytes ++;
if (bufptr && bufptr < bufend)
*bufptr++ = *format++;
*bufptr++ = *format;
format ++;
}
}