summaryrefslogtreecommitdiff
path: root/external/icu
diff options
context:
space:
mode:
Diffstat (limited to 'external/icu')
-rw-r--r--external/icu/UnpackedTarball_icu.mk1
-rw-r--r--external/icu/icu4c-buffer-overflow.patch4
-rw-r--r--external/icu/icu4c-ubsan.patch.022
-rw-r--r--external/icu/icu4c-wchar_t.patch10
4 files changed, 7 insertions, 30 deletions
diff --git a/external/icu/UnpackedTarball_icu.mk b/external/icu/UnpackedTarball_icu.mk
index c550f83ff834..77cd38a8bb1f 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -21,7 +21,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/icu4c-mkdir.patch \
external/icu/icu4c-buffer-overflow.patch \
external/icu/icu4c-$(if $(filter ANDROID,$(OS)),android,rpath).patch \
- external/icu/icu4c-ubsan.patch.0 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/icu/icu4c-buffer-overflow.patch b/external/icu/icu4c-buffer-overflow.patch
index 46815634addd..fb5f8abbaa58 100644
--- a/external/icu/icu4c-buffer-overflow.patch
+++ b/external/icu/icu4c-buffer-overflow.patch
@@ -11,7 +11,7 @@ Index: icu/source/tools/pkgdata/pkgdata.cpp
===================================================================
--- build/icu.orig/source/tools/pkgdata/pkgdata.cpp
+++ build/icu/source/tools/pkgdata/pkgdata.cpp
-@@ -1980,12 +1980,12 @@
+@@ -2060,12 +2060,12 @@
const char cmd[] = "icu-config --incpkgdatafile";
/* #1 try the same path where pkgdata was called from. */
@@ -22,7 +22,7 @@ Index: icu/source/tools/pkgdata/pkgdata.cpp
- uprv_strncat(cmdBuf, U_FILE_SEP_STRING, 1024);
+ uprv_strncat(cmdBuf, U_FILE_SEP_STRING, sizeof(cmdBuf)-1-strlen(cmdBuf));
}
-- uprv_strncat(cmdBuf, cmd, 1024);
+- uprv_strncat(cmdBuf, cmd, 1023);
+ uprv_strncat(cmdBuf, cmd, sizeof(cmdBuf)-1-strlen(cmdBuf));
if(verbose) {
diff --git a/external/icu/icu4c-ubsan.patch.0 b/external/icu/icu4c-ubsan.patch.0
deleted file mode 100644
index 991c537acc0a..000000000000
--- a/external/icu/icu4c-ubsan.patch.0
+++ /dev/null
@@ -1,22 +0,0 @@
---- source/common/ustring.cpp
-+++ source/common/ustring.cpp
-@@ -1486,7 +1486,7 @@
- */
-
- #define STRING_HASH(TYPE, STR, STRLEN, DEREF) \
-- int32_t hash = 0; \
-+ uint32_t hash = 0; \
- const TYPE *p = (const TYPE*) STR; \
- if (p != NULL) { \
- int32_t len = (int32_t)(STRLEN); \
---- source/i18n/ucol_tok.cpp
-+++ source/i18n/ucol_tok.cpp
-@@ -48,7 +48,7 @@
- static int32_t U_CALLCONV
- uhash_hashTokens(const UHashTok k)
- {
-- int32_t hash = 0;
-+ uint32_t hash = 0;
- //uint32_t key = (uint32_t)k.integer;
- UColToken *key = (UColToken *)k.pointer;
- if (key != 0) {
diff --git a/external/icu/icu4c-wchar_t.patch b/external/icu/icu4c-wchar_t.patch
index b3eefe104a7f..4a8067c879ad 100644
--- a/external/icu/icu4c-wchar_t.patch
+++ b/external/icu/icu4c-wchar_t.patch
@@ -6,11 +6,11 @@
# /EHsc enables exception handling
-# /Zc:wchar_t makes wchar_t a native type. Required for C++ ABI compatibility.
# -D_CRT_SECURE_NO_DEPRECATE is needed to quiet warnings about using standard C functions.
--CFLAGS+=/GF /nologo
--CXXFLAGS+=/GF /nologo /EHsc /Zc:wchar_t
-+CFLAGS+=/GF /nologo /Zc:wchar_t-
-+CXXFLAGS+=/GF /nologo /EHsc /Zc:wchar_t-
+-CFLAGS+=-GF -nologo
+-CXXFLAGS+=-GF -nologo -EHsc -Zc:wchar_t
++CFLAGS+=-GF -nologo -Zc:wchar_t-
++CXXFLAGS+=-GF -nologo -EHsc -Zc:wchar_t-
CPPFLAGS+=-D_CRT_SECURE_NO_DEPRECATE
DEFS+=-DWIN32 -DCYGWINMSVC
- LDFLAGS+=/nologo
+ LDFLAGS+=-nologo