Bug 1374012 - Update to Expat 2.2.1. Part 3: Reject invalid DTD. r=erahm

Differential Revision: https://phabricator.services.mozilla.com/D14442

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Peter Van der Beken 2018-12-27 15:13:12 +00:00
parent 177f23f661
commit 650f9e44c2

View File

@ -3934,6 +3934,14 @@ entityValueInitProcessor(XML_Parser parser,
*nextPtr = next;
return XML_ERROR_NONE;
}
/* If we get this token, we have the start of what might be a
normal tag, but not a declaration (i.e. it doesn't begin with
"<!"). In a DTD context, that isn't legal.
*/
else if (tok == XML_TOK_INSTANCE_START) {
*nextPtr = next;
return XML_ERROR_SYNTAX;
}
start = next;
eventPtr = start;
}