summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-10-29 17:02:37 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-10-29 17:02:37 +0000
commitaa5452176994532eebece21dc5c8d01fe419c73f (patch)
treef9be4ba39bdbf1eadb5d5349e23a274fff13d618 /utf8.c
parent0169df56891b9c66f66b71f4011afc0aea9dc534 (diff)
downloadperl-aa5452176994532eebece21dc5c8d01fe419c73f.tar.gz
UTF-8 decoder tweak.
p4raw-id: //depot/perl@7481
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/utf8.c b/utf8.c
index 80f88466e6..9ac63a6ffd 100644
--- a/utf8.c
+++ b/utf8.c
@@ -210,7 +210,7 @@ Perl_utf8_to_uv(pTHX_ U8* s, STRLEN curlen, STRLEN* retlen, U32 flags)
goto malformed;
}
- if ((uv >= 0xc0 && uv <= 0xfd && s[1] < 0x80) &&
+ if ((uv >= 0xc0 && uv <= 0xfd && curlen >1 && s[1] < 0x80) &&
!(flags & UTF8_ALLOW_NON_CONTINUATION)) {
if (dowarn)
Perl_warner(aTHX_ WARN_UTF8,