diff options
author | Yitzchak Scott-Thoennes <sthoenna@efn.org> | 2000-11-13 06:49:40 -0800 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-11-14 01:13:54 +0000 |
commit | cc366d4bfec1d12643c0fb8ca45074934bcc46bb (patch) | |
tree | 4cea6dddce3edc7f288719bc10bd012e88a2c072 /pp.c | |
parent | 54d9745e6c10264c5b7e27933a7a229432a2760e (diff) | |
download | perl-cc366d4bfec1d12643c0fb8ca45074934bcc46bb.tar.gz |
[ID 20001113.003] utf8_to_uv on malformed utf returns wrong values
Message-Id: <200011132249.eADMnek09679@garcia.efn.org>
p4raw-id: //depot/perl@7677
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1486,7 +1486,7 @@ PP(pp_complement) send = tmps + len; while (tmps < send) { - UV c = utf8_to_uv(tmps, 0, &l, UTF8_ALLOW_ANY); + UV c = utf8_to_uv(tmps, send-tmps, &l, UTF8_ALLOW_ANYUV); tmps += UTF8SKIP(tmps); targlen += UNISKIP(~c); nchar++; @@ -1500,7 +1500,7 @@ PP(pp_complement) if (nwide) { Newz(0, result, targlen + 1, U8); while (tmps < send) { - UV c = utf8_to_uv(tmps, 0, &l, UTF8_ALLOW_ANY); + UV c = utf8_to_uv(tmps, send-tmps, &l, UTF8_ALLOW_ANYUV); tmps += UTF8SKIP(tmps); result = uv_to_utf8(result, ~c); } |