You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pcre2test: avoid printing invalid utf trail in partial match (#237)
When match_invalid_utf is enabled, invalid UTF-8 data can't match
but it was mistakenly getting printed as part of a partial match
eventhough the ovector correctly didn't include it, as shown by:
PCRE2 version 10.34 2019-11-21
re> /(?<=..)X/match_invalid_utf,allvector
data> XX\x80\=ph,ovector=1
Partial match: \x{80}
** ovector[1] is not equal to the subject length: 2 != 3
0: 2 2
Fix the logic to print instead the empty match that was returned
and address a buffer overread when trying to decode UTF-8 that was
missing code units.
Fixes: #235
0 commit comments