Another fix to the recent (*ACCEPT) patch. Fixes clusterfuzz 15242.

This commit is contained in:
Philip.Hazel 2019-06-14 15:44:57 +00:00
parent 49f174ef78
commit 300bf6e2d6
3 changed files with 19 additions and 4 deletions

View File

@ -2599,10 +2599,20 @@ while (ptr < ptrend)
errorcode = ERR28;
goto FAILED;
}
if (!inverbname && after_manual_callout-- <= 0)
parsed_pattern = manage_callouts(thisptr, &previous_callout,
auto_callout, parsed_pattern, cb);
PARSED_LITERAL(c, parsed_pattern);
if (inverbname)
{ /* Don't use PARSED_LITERAL() because it */
#if PCRE2_CODE_UNIT_WIDTH == 32 /* sets okquantifier. */
if (c >= META_END) *parsed_pattern++ = META_BIGVALUE;
#endif
*parsed_pattern++ = c;
}
else
{
if (after_manual_callout-- <= 0)
parsed_pattern = manage_callouts(thisptr, &previous_callout,
auto_callout, parsed_pattern, cb);
PARSED_LITERAL(c, parsed_pattern);
}
meta_quantifier = 0;
}
continue; /* Next character */

2
testdata/testinput2 vendored
View File

@ -5605,4 +5605,6 @@ a)"xI
/(*:\)?/
/(*:\Q \E){5}/alt_verbnames
# End of testinput2

View File

@ -16960,6 +16960,9 @@ MK: XX
/(*:\)?/
Failed: error 109 at offset 5: quantifier does not follow a repeatable item
/(*:\Q \E){5}/alt_verbnames
Failed: error 109 at offset 11: quantifier does not follow a repeatable item
# End of testinput2
Error -70: PCRE2_ERROR_BADDATA (unknown error number)
Error -62: bad serialized data