diff options
author | tron <tron@pkgsrc.org> | 2013-12-16 16:12:01 +0000 |
---|---|---|
committer | tron <tron@pkgsrc.org> | 2013-12-16 16:12:01 +0000 |
commit | f08ae50ec383370a80811f3aa720470d551fb7f7 (patch) | |
tree | 971cdbf07641db3aa9ffa8e12d90d315e3f62c83 | |
parent | d2ddd37e33fd91959dc9e8fa3627e50ab9f27372 (diff) | |
download | pkgsrc-f08ae50ec383370a80811f3aa720470d551fb7f7.tar.gz |
Pullup ticket #4267 - requested by taca
textproc/icu: security patch
Revisions pulled up:
- textproc/icu/Makefile patch
- textproc/icu/distinfo patch
- textproc/icu/patches/patch-i18n_csrucode.cpp patch
---
Apply patch to fix the security vulnerability reported in CVE-2013-2924.
-rw-r--r-- | textproc/icu/Makefile | 3 | ||||
-rw-r--r-- | textproc/icu/distinfo | 3 | ||||
-rw-r--r-- | textproc/icu/patches/patch-i18n_csrucode.cpp | 37 |
3 files changed, 41 insertions, 2 deletions
diff --git a/textproc/icu/Makefile b/textproc/icu/Makefile index b21daf4c9bf..02f0e329ccf 100644 --- a/textproc/icu/Makefile +++ b/textproc/icu/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.84 2013/06/04 06:39:45 adam Exp $ +# $NetBSD: Makefile,v 1.84.4.1 2013/12/16 16:12:01 tron Exp $ DISTNAME= icu4c-51_2-src PKGNAME= ${DISTNAME:S/4c//:S/-src//:S/_/./g} +PKGREVISION= 1 CATEGORIES= textproc MASTER_SITES= http://download.icu-project.org/files/icu4c/${PKGVERSION_NOREV}/ EXTRACT_SUFX= .tgz diff --git a/textproc/icu/distinfo b/textproc/icu/distinfo index 5cc905b9b40..e694710e19a 100644 --- a/textproc/icu/distinfo +++ b/textproc/icu/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.35 2013/06/04 06:39:45 adam Exp $ +$NetBSD: distinfo,v 1.35.4.1 2013/12/16 16:12:01 tron Exp $ SHA1 (icu4c-51_2-src.tgz) = 074a28dfc96d37ce72c831f3e3e2d686f1f76a14 RMD160 (icu4c-51_2-src.tgz) = ef1256bb87b3dcec1cf40b32b11c5c3f1bd48af6 @@ -12,3 +12,4 @@ SHA1 (patch-common_putilimp.h) = ff97ae0b8fd96ec8296e5164c135610a1a358810 SHA1 (patch-common_unicode_platform.h) = 36cb68164fcf9b2858acabe95f0206e8088bfbaa SHA1 (patch-common_uposixdefs.h) = abe1989ea4312702e5d0172b662409957b3e2d91 SHA1 (patch-config_icu-config-bottom) = 4a167249d58cb6c729bc164e6abae869dd5e6b1a +SHA1 (patch-i18n_csrucode.cpp) = b97f6ed269ac47add23f7014eea40b08b191b7b2 diff --git a/textproc/icu/patches/patch-i18n_csrucode.cpp b/textproc/icu/patches/patch-i18n_csrucode.cpp new file mode 100644 index 00000000000..c98fdfb064d --- /dev/null +++ b/textproc/icu/patches/patch-i18n_csrucode.cpp @@ -0,0 +1,37 @@ +$NetBSD: patch-i18n_csrucode.cpp,v 1.1.2.1 2013/12/16 16:12:01 tron Exp $ + +Fix for CVE-2013-2924. + +--- i18n/csrucode.cpp.orig 2013-05-23 20:01:36.000000000 +0000 ++++ i18n/csrucode.cpp +@@ -33,8 +33,9 @@ UBool CharsetRecog_UTF_16_BE::match(Inpu + { + const uint8_t *input = textIn->fRawInput; + int32_t confidence = 0; ++ int32_t length = textIn->fRawLength; + +- if (input[0] == 0xFE && input[1] == 0xFF) { ++ if (length >=2 && input[0] == 0xFE && input[1] == 0xFF) { + confidence = 100; + } + +@@ -57,8 +58,9 @@ UBool CharsetRecog_UTF_16_LE::match(Inpu + { + const uint8_t *input = textIn->fRawInput; + int32_t confidence = 0; ++ int32_t length = textIn->fRawLength; + +- if (input[0] == 0xFF && input[1] == 0xFE && (input[2] != 0x00 || input[3] != 0x00)) { ++ if (length >= 4 && input[0] == 0xFF && input[1] == 0xFE && (input[2] != 0x00 || input[3] != 0x00)) { + confidence = 100; + } + +@@ -81,7 +83,7 @@ UBool CharsetRecog_UTF_32::match(InputTe + bool hasBOM = FALSE; + int32_t confidence = 0; + +- if (getChar(input, 0) == 0x0000FEFFUL) { ++ if (limit > 0 && getChar(input, 0) == 0x0000FEFFUL) { + hasBOM = TRUE; + } + |