No longer allow malformed element names (Bug #509)

This commit is contained in:
Michael R Sweet 2016-06-13 00:51:16 +00:00
parent ff7486f265
commit 0744218d66
2 changed files with 3 additions and 0 deletions

View File

@ -5,6 +5,7 @@ CHANGES IN Mini-XML 2.10
- The version number in mxml.h was wrong (Bug #532)
- The mxml.spec file was out of date (Bug #521)
- Mini-XML no longer allows malformed element names (Bug #509)
- mxmlLoad* and mxmlSAXLoad* did not properly create text nodes when
MXML_TEXT_CALLBACK was specified (Bug #531)
- mxmlDelete used a recursive algorithm which could require large

View File

@ -1577,6 +1577,8 @@ mxml_load_data(
if (mxml_add_char(ch, &bufptr, &buffer, &bufsize))
goto error;
}
else if (ch < '0' && ch != '!' && ch != '-' && ch != '.' && ch != '/')
goto error;
else if (mxml_add_char(ch, &bufptr, &buffer, &bufsize))
goto error;
else if (((bufptr - buffer) == 1 && buffer[0] == '?') ||