mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2026-01-26 21:41:34 +03:00
parser: Fix parsing of PublicIds and VersionNums
Regressed in 8231c0366.
Fixes #940.
This commit is contained in:
4
parser.c
4
parser.c
@@ -4441,7 +4441,7 @@ xmlParsePubidLiteral(xmlParserCtxt *ctxt) {
|
||||
int newSize;
|
||||
|
||||
newSize = xmlGrowCapacity(size, 1, 1, maxLength);
|
||||
if (newSize) {
|
||||
if (newSize < 0) {
|
||||
xmlFatalErr(ctxt, XML_ERR_NAME_TOO_LONG, "Public ID");
|
||||
xmlFree(buf);
|
||||
return(NULL);
|
||||
@@ -9908,7 +9908,7 @@ xmlParseVersionNum(xmlParserCtxt *ctxt) {
|
||||
int newSize;
|
||||
|
||||
newSize = xmlGrowCapacity(size, 1, 1, maxLength);
|
||||
if (newSize) {
|
||||
if (newSize < 0) {
|
||||
xmlFatalErr(ctxt, XML_ERR_NAME_TOO_LONG, "VersionNum");
|
||||
xmlFree(buf);
|
||||
return(NULL);
|
||||
|
||||
Reference in New Issue
Block a user