[glibc/f17] Resolves: sw14134 - Fix iconv() segfault when the invalid multibyte character 0xffff is input wh

Patsy Franklin pfrankli at fedoraproject.org
Tue Jun 5 19:14:45 UTC 2012


commit 300d3e04397d01cdc75c22f30786cfa6e9c1bfbd
Author: Patsy Franklin <pfrankli at redhat.com>
Date:   Tue Jun 5 15:12:40 2012 -0400

    Resolves: sw14134
    - Fix iconv() segfault when the invalid multibyte character 0xffff is input
        when converting from IBM930 (#823905)

 glibc-rh823905.patch |   14 ++++++++++++++
 glibc.spec           |   10 +++++++++-
 2 files changed, 23 insertions(+), 1 deletions(-)
---
diff --git a/glibc-rh823905.patch b/glibc-rh823905.patch
new file mode 100644
index 0000000..c0a0e01
--- /dev/null
+++ b/glibc-rh823905.patch
@@ -0,0 +1,14 @@
+diff --git a/iconvdata/ibm930.c b/iconvdata/ibm930.c
+index 25a9be0..6f758eb 100644
+--- a/iconvdata/ibm930.c
++++ b/iconvdata/ibm930.c
+@@ -162,7 +162,8 @@ enum
+ 	while (ch > rp2->end)						      \
+ 	  ++rp2;							      \
+ 									      \
+-	if (__builtin_expect (ch < rp2->start, 0)			      \
++	if (__builtin_expect (rp2->start == 0xffff, 0)			      \
++	    || __builtin_expect (ch < rp2->start, 0)			      \
+ 	    || (res = __ibm930db_to_ucs4[ch + rp2->idx],		      \
+ 		__builtin_expect (res, L'\1') == L'\0' && ch != '\0'))	      \
+ 	  {								      \
diff --git a/glibc.spec b/glibc.spec
index bb1a28f..ee8389f 100644
--- a/glibc.spec
+++ b/glibc.spec
@@ -28,7 +28,7 @@
 Summary: The GNU libc libraries
 Name: glibc
 Version: %{glibcversion}
-Release: 39%{?dist}
+Release: 40%{?dist}
 # GPLv2+ is used in a bunch of programs, LGPLv2+ is used for libraries.
 # Things that are linked directly into dynamically linked programs
 # and shared libraries (e.g. crt files, lib*_nonshared.a) have an additional
@@ -196,6 +196,9 @@ Patch2056: %{name}-rh801650-3.patch
 # Upstream BZ 14185
 Patch2057: %{name}-rh819430.patch
 
+# Upstream BZ 14134
+Patch2058: %{name}-rh823905.patch
+
 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Obsoletes: glibc-profile < 2.4
 Obsoletes: nss_db
@@ -471,6 +474,7 @@ popd
 
 %patch2056 -p1
 %patch2057 -p1
+%patch2058 -p1
 
 # A lot of programs still misuse memcpy when they have to use
 # memmove. The memcpy implementation below is not tolerant at
@@ -1323,6 +1327,10 @@ rm -f *.filelist*
 %endif
 
 %changelog
+* Tue Jun  5 2012 Patsy Franklin <patsy at redhat.com> - 2.15.40
+  - Fix iconv() segfault when the invalid multibyte character 0xffff is input
+    when converting from IBM930 (#823905)
+
 * Fri Jun 1 2012 Jeff Law <law at redhat.com> - 2.15-39
   - Update arm specific configury.
 


More information about the scm-commits mailing list