mirror of
https://github.com/libexpat/libexpat.git
synced 2025-04-04 21:04:57 +00:00
Stop updating m_eventPtr on exit for reentry
The fix for recursive entity processing introduced a reenter flag that returns the execution from the current function and switches to entity processing. The same fix also updates the m_eventPtr during this switch. However this update changes the behaviour in certain cases as the older version does not update the m_eventPtr while recursing into entity processing. This commit removes the pointer update and restores the old behaviour.
This commit is contained in:
parent
91ca72e913
commit
89a9c6807c
1 changed files with 3 additions and 1 deletions
|
@ -3402,12 +3402,13 @@ doContent(XML_Parser parser, int startTagLevel, const ENCODING *enc,
|
||||||
break;
|
break;
|
||||||
/* LCOV_EXCL_STOP */
|
/* LCOV_EXCL_STOP */
|
||||||
}
|
}
|
||||||
*eventPP = s = next;
|
|
||||||
switch (parser->m_parsingStatus.parsing) {
|
switch (parser->m_parsingStatus.parsing) {
|
||||||
case XML_SUSPENDED:
|
case XML_SUSPENDED:
|
||||||
|
*eventPP = next;
|
||||||
*nextPtr = next;
|
*nextPtr = next;
|
||||||
return XML_ERROR_NONE;
|
return XML_ERROR_NONE;
|
||||||
case XML_FINISHED:
|
case XML_FINISHED:
|
||||||
|
*eventPP = next;
|
||||||
return XML_ERROR_ABORTED;
|
return XML_ERROR_ABORTED;
|
||||||
case XML_PARSING:
|
case XML_PARSING:
|
||||||
if (parser->m_reenter) {
|
if (parser->m_reenter) {
|
||||||
|
@ -3416,6 +3417,7 @@ doContent(XML_Parser parser, int startTagLevel, const ENCODING *enc,
|
||||||
}
|
}
|
||||||
/* Fall through */
|
/* Fall through */
|
||||||
default:;
|
default:;
|
||||||
|
*eventPP = s = next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* not reached */
|
/* not reached */
|
||||||
|
|
Loading…
Add table
Reference in a new issue