diff options
author | Michaël Meyer <hierophanie@gmail.com> | 2016-02-04 04:01:19 +0100 |
---|---|---|
committer | Michaël Meyer <hierophanie@gmail.com> | 2016-02-04 04:06:28 +0100 |
commit | 1f17487aa952a11f2ac53481b26b5a25b9a2fccc (patch) | |
tree | cec3e05eb7b416717edf22fa5f8c301fc8df7c77 /utf8proc.c | |
parent | ec0daa50bbedc36a0bada4a0f713eb9dc317d444 (diff) | |
download | libutf8proc-1f17487aa952a11f2ac53481b26b5a25b9a2fccc.tar.gz libutf8proc-1f17487aa952a11f2ac53481b26b5a25b9a2fccc.tar.bz2 |
Fix overrun
Diffstat (limited to 'utf8proc.c')
-rw-r--r-- | utf8proc.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -128,7 +128,7 @@ UTF8PROC_DLLEXPORT utf8proc_ssize_t utf8proc_iterate( if ((uc - 0xc2) > (0xf4-0xc2)) return UTF8PROC_ERROR_INVALIDUTF8; if (uc < 0xe0) { // 2-byte sequence // Must have valid continuation character - if (!utf_cont(*str)) return UTF8PROC_ERROR_INVALIDUTF8; + if (str >= end || !utf_cont(*str)) return UTF8PROC_ERROR_INVALIDUTF8; *dst = ((uc & 0x1f)<<6) | (*str & 0x3f); return 2; } |