Resolves: rhbz#766542 CVE-2011-4599 Stack-based buffer overflow

This commit is contained in:
Eike Rathke 2011-12-13 20:00:41 +01:00
parent 4511ad6d78
commit af25243294
2 changed files with 27 additions and 1 deletions

View File

@ -0,0 +1,20 @@
--- icu/source/common/uloc.c
+++ icu/source/common/uloc.c
@@ -1797,7 +1797,7 @@
int32_t variantLen = _deleteVariant(variant, uprv_min(variantSize, (nameCapacity-len)), variantToCompare, n);
len -= variantLen;
if (variantLen > 0) {
- if (name[len-1] == '_') { /* delete trailing '_' */
+ if (len > 0 && name[len-1] == '_') { /* delete trailing '_' */
--len;
}
addKeyword = VARIANT_MAP[j].keyword;
@@ -1805,7 +1805,7 @@
break;
}
}
- if (name[len-1] == '_') { /* delete trailing '_' */
+ if (len > 0 && len <= nameCapacity && name[len-1] == '_') { /* delete trailing '_' */
--len;
}
}

View File

@ -1,6 +1,6 @@
Name: icu
Version: 4.8.1
Release: 2%{?dist}
Release: 3%{?dist}
Summary: International Components for Unicode
Group: Development/Tools
License: MIT and UCD and Public Domain
@ -13,6 +13,7 @@ Requires: lib%{name} = %{version}-%{release}
Patch1: icu.8198.revert.icu5431.patch
Patch2: icu.8800.freeserif.crash.patch
Patch3: icu.7601.Indic-ccmp.patch
Patch4: icu.8984.CVE-2011-4599.patch
%description
Tools and utilities for developing with icu.
@ -55,6 +56,7 @@ BuildArch: noarch
%patch1 -p2 -R -b .icu8198.revert.icu5431.patch
%patch2 -p1 -b .icu8800.freeserif.crash.patch
%patch3 -p1 -b .icu7601.Indic-ccmp.patch
%patch4 -p1 -b .icu8984.CVE-2011-4599.patch
%build
cd source
@ -142,6 +144,10 @@ rm -rf $RPM_BUILD_ROOT
%doc source/__docs/%{name}/html/*
%changelog
* Tue Dec 13 2011 Eike Rathke <erack@redhat.com> - 4.8.1-3
- Resolves: rhbz#766542 CVE-2011-4599 Stack-based buffer overflow
- add icu.8984.CVE-2011-4599.patch
* Mon Oct 24 2011 Caolán McNamara <caolanm@redhat.com> - 4.8.1-2
- Resolves: rhbz#747193 try and enable ccmp for Indic fonts