r3417 - in glibc-package/trunk/debian: . patches patches/any
Author: aurel32
Date: 2009-04-24 21:17:51 +0000 (Fri, 24 Apr 2009)
New Revision: 3417
Added:
glibc-package/trunk/debian/patches/any/cvs-iconv-utf16.diff
Modified:
glibc-package/trunk/debian/changelog
glibc-package/trunk/debian/patches/series
Log:
* any/cvs-iconv-utf16.diff: new patch from upstream to reject UTF-8-encoded
UTF-16 surrogates in iconv. Closes: #525299.
Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog 2009-04-24 09:49:33 UTC (rev 3416)
+++ glibc-package/trunk/debian/changelog 2009-04-24 21:17:51 UTC (rev 3417)
@@ -8,6 +8,8 @@
sys/mount.h. Closes: #523952.
* arm/submitted-fpu_control_h.diff: new patch to disable macros from
<fpu_control.h> on EABI. Closes: #525261.
+ * any/cvs-iconv-utf16.diff: new patch from upstream to reject UTF-8-encoded
+ UTF-16 surrogates in iconv. Closes: #525299.
[ Petr Salinger ]
* kfreebsd/local-sysdeps.diff: update to revision 2450 (from glibc-bsd).
Added: glibc-package/trunk/debian/patches/any/cvs-iconv-utf16.diff
===================================================================
--- glibc-package/trunk/debian/patches/any/cvs-iconv-utf16.diff (rev 0)
+++ glibc-package/trunk/debian/patches/any/cvs-iconv-utf16.diff 2009-04-24 21:17:51 UTC (rev 3417)
@@ -0,0 +1,21 @@
+2009-04-24 Ulrich Drepper <drepper@redhat.com>
+
+ [BZ #10093]
+ * iconv/gconv_simple.c (BODY for UTF-8 to INTERNAL): Don't accept
+ UTF-16 surrogates.
+
+diff --git a/iconv/gconv_simple.c b/iconv/gconv_simple.c
+index 5cf3237..e34f377 100644
+--- a/iconv/gconv_simple.c
++++ b/iconv/gconv_simple.c
+@@ -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; \
Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series 2009-04-24 09:49:33 UTC (rev 3416)
+++ glibc-package/trunk/debian/patches/series 2009-04-24 21:17:51 UTC (rev 3417)
@@ -198,3 +198,4 @@
any/local-disable-gethostbyname4.diff
any/submitted-getaddrinfo-lo.diff
any/submitted-mount_h.diff
+any/cvs-iconv-utf16.diff
Reply to: