diff options
author | Jakub Jelinek <jakub@redhat.com> | 2009-04-24 19:14:55 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2009-04-24 19:14:55 +0000 |
commit | 8feaf01b210752a478e2e59a274ef244c8af2c0b (patch) | |
tree | 1ed5e46ca5e574d6de90c4b099f9866d22fc424e /iconv | |
parent | 7dec33c08e4755e72d1280e48e61f0141dfc1da5 (diff) | |
download | glibc-8feaf01b210752a478e2e59a274ef244c8af2c0b.tar glibc-8feaf01b210752a478e2e59a274ef244c8af2c0b.tar.gz glibc-8feaf01b210752a478e2e59a274ef244c8af2c0b.tar.bz2 glibc-8feaf01b210752a478e2e59a274ef244c8af2c0b.zip |
Updated to fedora-glibc-20090424T1908cvs/fedora-glibc-2_9_90-21
Diffstat (limited to 'iconv')
-rw-r--r-- | iconv/gconv_simple.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/iconv/gconv_simple.c b/iconv/gconv_simple.c index 5cf3237abb..e34f3770ad 100644 --- a/iconv/gconv_simple.c +++ b/iconv/gconv_simple.c @@ -1,5 +1,5 @@ /* Simple transformations functions. - Copyright (C) 1997-2005, 2007, 2008 Free Software Foundation, Inc. + Copyright (C) 1997-2005, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. @@ -1037,7 +1037,9 @@ ucs4le_internal_loop_single (struct __gconv_step *step, /* If i < cnt, some trail byte was not >= 0x80, < 0xc0. \ If cnt > 2 and ch < 2^(5*cnt-4), the wide character ch could \ have been represented with fewer than cnt bytes. */ \ - if (i < cnt || (cnt > 2 && (ch >> (5 * cnt - 4)) == 0)) \ + if (i < cnt || (cnt > 2 && (ch >> (5 * cnt - 4)) == 0) \ + /* Do not accept UTF-16 surrogates. */ \ + || (ch >= 0xd800 && ch <= 0xdfff)) \ { \ /* This is an illegal encoding. */ \ goto errout; \ |