summaryrefslogtreecommitdiff
path: root/dev-libs/icu
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/icu')
-rw-r--r--dev-libs/icu/Manifest2
-rw-r--r--dev-libs/icu/files/icu-63.1-CVE-2018-18928.patch62
-rw-r--r--dev-libs/icu/icu-63.1-r1.ebuild143
3 files changed, 207 insertions, 0 deletions
diff --git a/dev-libs/icu/Manifest b/dev-libs/icu/Manifest
index 65240f362b6e..234c2fd2c3ed 100644
--- a/dev-libs/icu/Manifest
+++ b/dev-libs/icu/Manifest
@@ -3,6 +3,7 @@ AUX icu-58.1-remove-bashisms.patch 5888 BLAKE2B 03a7197360a956799eb52a615272dcf1
AUX icu-58.2-CVE-2017-7867.patch 8934 BLAKE2B 7f934d75a99953d69ac54f8544c698d3bd774a37a463237b6b043713a35f2991a444a482191107070b1d1c0055f813d3692102cb08091cc7cda575e37fb076db SHA512 6e29326f378461ae07b253c59550447096352be1247e575d974839cea37ec326f7fa8dca58caab63544582ef9f4b3c71c9e3fa0eceb2e85fb7380ee71b138c5a
AUX icu-58.2-darwin.patch 2076 BLAKE2B d85d07ae3ade827a81bf2ce4eb2813a6535d7cd70e68241b29ee72c0a41115e3cab0490727771309c32f1eb0853c1a8ce3cf6aae64186037d8ee75d035cb0478 SHA512 fe884a72d354324ad0b1e5502d834fbecafae22a290fb152058d6507b218c4f07efc34cc7d978bae0adb54f74dadf00df7a2679c480dc7681ee287da7f678cb7
AUX icu-58.2-glibc226.patch 463 BLAKE2B 840440c4a3eb0882ac6733d3c5f44568bc081fce6f3f641e01d76f01fe1f35f74cc2465e89b3353ab86569c7478090df459a659d69143810ba121e15c27923dd SHA512 20d8e76c43ef5549ca7f104b052661269c99d4af45b2a65bd9d72e28b01d0c3b70c066b51799e09d7117a4a39e44fd463fae2522a238a41972c0679c290c5da3
+AUX icu-63.1-CVE-2018-18928.patch 2813 BLAKE2B 21940b9c1f17eed7f056a8c60b5a8da3790955fe6bab02336b0c042d80d90afd02a54dbe441fa38a536b2a77f08fb629510186a0419ad6352b3bc461c7b9b9e3 SHA512 f55cc50673e33dfba4d213bb4f18dd905e9db372dde4c64c1f389c0cd19b31e5fd0aaa113778068758497b35667061659d55fafd0eae818624c9374e17a8d5c5
DIST icu4c-58_2-src.tgz 23369902 BLAKE2B cdd2e02c3aba050f5b7f8b38c5a3731e3e5f1cc1403ef86a50908b95560ea3cf8a2d47119fa60cf34f22a8b65eaa2392fd5bcbd3bc48b3da541fe3d9bd7392c0 SHA512 5c21af748f48b392e6c0412bd0aee92162ea931820dcbfab4ec6e0299868504b303d88f7586cc95de55c777ac0dca3a29d6c8ca0892c646ebc864c8a5b5a162a
DIST icu4c-60_2-src.tgz 23317835 BLAKE2B dabd24a9317b44f6852c61c83e808c920d7d29f57d53a7450c68cdad5f84941f771db07fab1f5a16451d59c7aa2750e5a4d5b5fa9a904c43d131529b648263ea SHA512 8e718e66c13e7f25714404c46b91ed6305efff1df70c328be2ec743023a7719016dae72a5fa0a05d6f5599983590a2044ff72d3453a048d987ab546d0416d694
DIST icu4c-62_1-src.tgz 23468750 BLAKE2B c0b665af53a494fc064425e6b3e66ae11d31509f4edc42268b12b85ece5ea635ebc76a8f3ab65a49b74a849a67ffd526e15e6d1b5b07e13c7f94cc94bef1d31c SHA512 8295f2754fb6907e2cc8f515dccca05530963b544e89a2b8e323cd0ddfdbbe0c9eba8b367c1dbc04d7bb906b66b1003fd545ca05298939747c832c9d4431cf2a
@@ -10,5 +11,6 @@ DIST icu4c-63_1-src.tgz 23746939 BLAKE2B 5a665554506ff705c83c7a03a1b5598b1a48afb
EBUILD icu-58.2-r1.ebuild 4052 BLAKE2B 7f3258a4b34395d70fe644255021236f8db6a7e064dae9c0133655d0a51e80ab029e63e6f76fb0d5b063b47ec8b68f239e68bf8f58b66d0e83ac29b8676da061 SHA512 aa772b809d2fda7b50d9ff58bce94324bb3d76be3a4d64e395895a1a3d079a51a71019b610b6155052c5ad0a9cc7d33700104b1688ec73790fe49b437d3d9b42
EBUILD icu-60.2.ebuild 3710 BLAKE2B 11a56611d570980031040391168bd5c18ca2000c30e9e56edf2662b9ead959c684cada13656726e5e868803ab9c4f81309b51f3b65693175298cb163417f32b0 SHA512 65919063056eb718f860664d42f466278da3bf5d78e54e4ad24b22768b244c76c81053ead55871fefd2d185dfcdfb065e93c38ccc4515000996d7ef307d4a1cb
EBUILD icu-62.1.ebuild 3688 BLAKE2B ff8e850ead70730bfe852bbf2795d72d41325afd7b723e6abf815cad316a4b777ba0f94a71952eaa06dec331aa122d1dc4958728ba9ade5239e39d62cf18a4c2 SHA512 7ce709631d488554ca575361126362973f74589380367acc5b0cfedef93ea5d9ce339326e1fc9969640c3eff4537d4b6f669342400cc9cae7fc3a6a721e32c50
+EBUILD icu-63.1-r1.ebuild 3315 BLAKE2B c3480bc9248c9c10223e8c814690fabc24feecf4680c1160e42e8f1ebd01253f16eaeca6abee7fb18df526d9f15604bf6c2910de6dcc277c2846c015bcc06fd8 SHA512 c786988733b191ef4b08e116151b6be6472884f31e720a3628698b4f5d429913a6399b2cf6947133f23847ecd280481d552c87d9b9c8c4fed6634768a62a3c1b
EBUILD icu-63.1.ebuild 3697 BLAKE2B ce9836ddb2c78d65f8d3620a4dbb72cbaa77f9dde72d345eda94ed74973b6fed8d8e726362228b02721ddb627b9fda85855e57e1a3d01cf125ba70a83a835975 SHA512 2d0bae7f3bb25e8a0adbc3c7320f99e632c70b53133819f56d31d3a2f0b43f4172e59175952ab1aea880727b5495f0c553b2802b469bcf547e454bb7cc934c19
MISC metadata.xml 255 BLAKE2B 9b8486730bea2158e8be5cbbe0552c5460d1b18e2236a68e3f11d85ce4eeb96eb0e746f44a10cb7cdcf1bf498190a512ef42f47852c6843b9a3c937ceabc338d SHA512 ac646e8ac676faf0aac283e4be31c5f2b29e98ccf07327073ed05e688ce696caf639bdfea63e4aed141a90e84c0a86892bc717a52b95cdf1739aaa15240013c3
diff --git a/dev-libs/icu/files/icu-63.1-CVE-2018-18928.patch b/dev-libs/icu/files/icu-63.1-CVE-2018-18928.patch
new file mode 100644
index 000000000000..bbbef9e793d8
--- /dev/null
+++ b/dev-libs/icu/files/icu-63.1-CVE-2018-18928.patch
@@ -0,0 +1,62 @@
+From 53d8c8f3d181d87a6aa925b449b51c4a2c922a51 Mon Sep 17 00:00:00 2001
+From: Shane Carr <shane@unicode.org>
+Date: Mon, 29 Oct 2018 23:52:44 -0700
+Subject: [PATCH] ICU-20246 Fixing another integer overflow in number parsing.
+
+---
+ i18n/fmtable.cpp | 2 +-
+ i18n/number_decimalquantity.cpp | 5 ++++-
+ test/intltest/numfmtst.cpp | 8 ++++++++
+ .../icu/impl/number/DecimalQuantity_AbstractBCD.java | 5 ++++-
+ .../impl/number/DecimalQuantity_DualStorageBCD.java | 10 +++++++++-
+ .../com/ibm/icu/dev/test/format/NumberFormatTest.java | 5 +++++
+ 6 files changed, 31 insertions(+), 4 deletions(-)
+
+diff --git a/i18n/fmtable.cpp b/i18n/fmtable.cpp
+index 45c7024fc29..8601d95f4a6 100644
+--- a/i18n/fmtable.cpp
++++ b/i18n/fmtable.cpp
+@@ -734,7 +734,7 @@ CharString *Formattable::internalGetCharString(UErrorCode &status) {
+ // not print scientific notation for magnitudes greater than -5 and smaller than some amount (+5?).
+ if (fDecimalQuantity->isZero()) {
+ fDecimalStr->append("0", -1, status);
+- } else if (std::abs(fDecimalQuantity->getMagnitude()) < 5) {
++ } else if (fDecimalQuantity->getMagnitude() != INT32_MIN && std::abs(fDecimalQuantity->getMagnitude()) < 5) {
+ fDecimalStr->appendInvariantChars(fDecimalQuantity->toPlainString(), status);
+ } else {
+ fDecimalStr->appendInvariantChars(fDecimalQuantity->toScientificString(), status);
+diff --git a/i18n/number_decimalquantity.cpp b/i18n/number_decimalquantity.cpp
+index 47b930a564b..d5dd7ae694c 100644
+--- a/i18n/number_decimalquantity.cpp
++++ b/i18n/number_decimalquantity.cpp
+@@ -898,7 +898,10 @@ UnicodeString DecimalQuantity::toScientificString() const {
+ }
+ result.append(u'E');
+ int32_t _scale = upperPos + scale;
+- if (_scale < 0) {
++ if (_scale == INT32_MIN) {
++ result.append({u"-2147483648", -1});
++ return result;
++ } else if (_scale < 0) {
+ _scale *= -1;
+ result.append(u'-');
+ } else {
+diff --git a/test/intltest/numfmtst.cpp b/test/intltest/numfmtst.cpp
+index 34355939113..8d52dc122bf 100644
+--- a/test/intltest/numfmtst.cpp
++++ b/test/intltest/numfmtst.cpp
+@@ -9226,6 +9226,14 @@ void NumberFormatTest::Test20037_ScientificIntegerOverflow() {
+ assertEquals(u"Should not overflow and should parse only the first exponent",
+ u"1E-2147483647",
+ {sp.data(), sp.length(), US_INV});
++
++ // Test edge case overflow of exponent
++ result = Formattable();
++ nf->parse(u".0003e-2147483644", result, status);
++ sp = result.getDecimalNumber(status);
++ assertEquals(u"Should not overflow",
++ u"3E-2147483648",
++ {sp.data(), sp.length(), US_INV});
+ }
+
+ void NumberFormatTest::Test13840_ParseLongStringCrash() {
diff --git a/dev-libs/icu/icu-63.1-r1.ebuild b/dev-libs/icu/icu-63.1-r1.ebuild
new file mode 100644
index 000000000000..c5a3f0bd8b2f
--- /dev/null
+++ b/dev-libs/icu/icu-63.1-r1.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic toolchain-funcs autotools multilib-minimal
+
+DESCRIPTION="International Components for Unicode"
+HOMEPAGE="http://www.icu-project.org/"
+SRC_URI="http://download.icu-project.org/files/icu4c/${PV/_/}/icu4c-${PV//./_}-src.tgz"
+
+LICENSE="BSD"
+
+SLOT="0/${PV}"
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+IUSE="debug doc examples static-libs"
+
+DEPEND="
+ doc? ( app-doc/doxygen[dot] )
+"
+BDEPEND="
+ virtual/pkgconfig
+"
+
+S="${WORKDIR}/${PN}/source"
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/icu-config
+)
+
+PATCHES=(
+ "${FILESDIR}/${PN}-58.1-remove-bashisms.patch"
+ "${FILESDIR}/${PN}-58.2-darwin.patch"
+ "${FILESDIR}/${P}-CVE-2018-18928.patch"
+)
+
+src_prepare() {
+ default
+
+ local variable
+
+ # Disable renaming as it is stupid thing to do
+ sed -i \
+ -e "s/#define U_DISABLE_RENAMING 0/#define U_DISABLE_RENAMING 1/" \
+ common/unicode/uconfig.h || die
+
+ # Fix linking of icudata
+ sed -i \
+ -e "s:LDFLAGSICUDT=-nodefaultlibs -nostdlib:LDFLAGSICUDT=:" \
+ config/mh-linux || die
+
+ # Append doxygen configuration to configure
+ sed -i \
+ -e 's:icudefs.mk:icudefs.mk Doxyfile:' \
+ configure.ac || die
+
+ eautoreconf
+}
+
+src_configure() {
+ append-cxxflags -std=c++14
+
+ if tc-is-cross-compiler; then
+ mkdir "${WORKDIR}"/host || die
+ pushd "${WORKDIR}"/host >/dev/null || die
+
+ CFLAGS="" CXXFLAGS="" ASFLAGS="" LDFLAGS="" \
+ CC="$(tc-getBUILD_CC)" CXX="$(tc-getBUILD_CXX)" AR="$(tc-getBUILD_AR)" \
+ RANLIB="$(tc-getBUILD_RANLIB)" LD="$(tc-getBUILD_LD)" \
+ "${S}"/configure --disable-renaming --disable-debug \
+ --disable-samples --enable-static || die
+ emake
+
+ popd >/dev/null || die
+ fi
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myeconfargs=(
+ --disable-renaming
+ --disable-samples
+ --disable-layoutex
+ $(use_enable debug)
+ $(use_enable static-libs static)
+ $(multilib_native_use_enable examples samples)
+ )
+
+ tc-is-cross-compiler && myeconfargs+=(
+ --with-cross-build="${WORKDIR}"/host
+ )
+
+ # icu tries to use clang by default
+ tc-export CC CXX
+
+ # make sure we configure with the same shell as we run icu-config
+ # with, or ECHO_N, ECHO_T and ECHO_C will be wrongly defined
+ export CONFIG_SHELL="${EPREFIX}/bin/sh"
+ # probably have no /bin/sh in prefix-chain
+ [[ -x ${CONFIG_SHELL} ]] || CONFIG_SHELL="${BASH}"
+
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_compile() {
+ default
+
+ if multilib_is_native_abi && use doc; then
+ doxygen -u Doxyfile || die
+ doxygen Doxyfile || die
+ fi
+}
+
+multilib_src_test() {
+ # INTLTEST_OPTS: intltest options
+ # -e: Exhaustive testing
+ # -l: Reporting of memory leaks
+ # -v: Increased verbosity
+ # IOTEST_OPTS: iotest options
+ # -e: Exhaustive testing
+ # -v: Increased verbosity
+ # CINTLTST_OPTS: cintltst options
+ # -e: Exhaustive testing
+ # -v: Increased verbosity
+ emake -j1 VERBOSE="1" check
+}
+
+multilib_src_install() {
+ default
+
+ if multilib_is_native_abi && use doc; then
+ docinto html
+ dodoc -r doc/html/*
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ docinto html
+ dodoc ../readme.html
+}