Skip to content

Commit 957be9d

Browse files
committed
regexec.c: Use utf8_to_uv_or_die over utf8n_to_uvchr
This will now die if the input is malformed. We decided for 5.42 that it is pointless to continue on in pattern matching in the face of malformed input. This was the final occurrence of a to_uvchr() function in this file; the rest were converted for 5.42. This was deferred because of the lateness of the development cycle, and it didn't fix an obvious bug
1 parent 5439543 commit 957be9d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

regexec.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2084,8 +2084,7 @@ STMT_START { \
20842084
} \
20852085
else { /* Back-up to the start of the previous character */ \
20862086
U8 * const r = reghop3((U8*)s, -1, (U8*)reginfo->strbeg); \
2087-
tmp = utf8n_to_uvchr(r, (U8*) reginfo->strend - r, \
2088-
0, UTF8_ALLOW_DEFAULT); \
2087+
tmp = utf8_to_uv_or_die(r, (U8*) reginfo->strend, 0); \
20892088
} \
20902089
tmp = TEST_UV(tmp); \
20912090
REXEC_FBC_UTF8_SCAN(/* advances s while s < strend */ \

0 commit comments

Comments
 (0)