mirror of
https://github.com/Perl/perl5.git
synced 2026-01-26 16:39:36 +00:00
pp_pack.c: Use safe UTF8SKIP
This commit is contained in:
parent
cf70d9e66c
commit
18c47def02
@ -290,7 +290,7 @@ S_utf8_to_bytes(pTHX_ const char **s, const char *end, const char *buf, SSize_t
|
||||
if (from >= end) return FALSE;
|
||||
val = utf8n_to_uvchr((U8 *) from, end-from, &retlen, flags);
|
||||
if (retlen == (STRLEN) -1) {
|
||||
from += UTF8SKIP(from);
|
||||
from += UTF8_SAFE_SKIP(from, end);
|
||||
bad |= 1;
|
||||
} else from += retlen;
|
||||
if (val >= 0x100) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user