This could result in a buffer over read as reported in the linked ticket and that was only possible after 10.34 when match_invalid_utf was introduced, or if invalid data was matched without UTF validation, which is known to have undefined behaviour.
Also makes utf82ord() save when used with invalid UTF, as the same issue could be triggered in other ways (ex: using aftertext) as shown by:
PCRE2 version 10.34 2019-11-21
re> /(?<=..)X/match_invalid_utf,aftertext
data> \xc3\xb1x{10ffff}X\xb1\xf4\x8f\xbf
This could result in a buffer over read as reported in the linked ticket and that was only possible after 10.34 when match_invalid_utf was introduced, or if invalid data was matched without UTF validation, which is known to have undefined behaviour.
Also makes utf82ord() save when used with invalid UTF, as the same issue could be triggered in other ways (ex: using aftertext) as shown by:
Fixes: #235