Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions regexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -7135,10 +7135,10 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog)

while (chars) {
if (utf8_target) {
/* XXX This assumes the length is well-formed, as
* does the UTF8SKIP below */
uvc = utf8n_to_uvchr((U8*)uc, UTF8_MAXLEN, &len,
uniflags);
(void) utf8_to_uv_flags((U8*)uc, uc + UTF8_MAXLEN,
&uvc, &len,
( uniflags|UTF8_DIE_IF_MALFORMED
|UTF8_NO_CONFIDENCE_IN_CURLEN_));
uc += len;
}
else {
Expand All @@ -7150,8 +7150,9 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog)
while (foldlen) {
if (!--chars)
break;
uvc = utf8n_to_uvchr(uscan, foldlen, &len,
uniflags);
(void) utf8_to_uv_flags((U8*)uscan,
uscan + foldlen, &uvc, &len,
uniflags|UTF8_DIE_IF_MALFORMED);
uscan += len;
foldlen -= len;
}
Expand Down
Loading