xmlparse.c: Fix external entity infinite loop bug (CVE-2017-9233)
This commit is contained in:
parent
774ee6c15b
commit
c4bf96bb51
@ -3981,6 +3981,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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user