icu/icu4c.10129.wintz.patch | 26 ++++++++++++++++++++++++++ icu/makefile.mk | 1 + 2 files changed, 27 insertions(+)
New commits: commit f2cc7e08263a0fcca8b6dfe95ea74f4e7938103b Author: Isamu Mogi <saturda...@gmail.com> Date: Mon May 6 15:22:28 2013 +0000 fdo#59850: Resolves invalid date changing by ICU's timezone detection bug. This is a backport of 263ab3f14bbb8cea9f5a1b8ea7496f6a23e6c547 . Patch was also submitted with https://ssl.icu-project.org/trac/ticket/10129 of which the outcome should be monitored. u_strFromWCS() returns a wrong destination length for u_austrncpy() if apiTZI.StandardName is multibyte string. Therefore apiStdName will be incomplete string, and timezone detection (using apiStdName) returns invalid result. This will fix destination length for u_austrncpy() enough to write multibyte string. Change-Id: I859f322d952f4ceaf9f97c2bace71e3bb3dfb468 Reviewed-on: https://gerrit.libreoffice.org/3800 Reviewed-by: Eike Rathke <er...@redhat.com> Reviewed-by: Fridrich Strba <fridr...@documentfoundation.org> Tested-by: Fridrich Strba <fridr...@documentfoundation.org> diff --git a/icu/icu4c.10129.wintz.patch b/icu/icu4c.10129.wintz.patch new file mode 100644 index 0000000..d365f5e --- /dev/null +++ b/icu/icu4c.10129.wintz.patch @@ -0,0 +1,26 @@ + +# Fix for fdo#59850 +# Patch was also submitted with https://ssl.icu-project.org/trac/ticket/10129 +# of which the outcome should be monitored. + +--- misc/icu/source/common/wintz.c 2012-04-05 20:46:14.000000000 +0000 ++++ misc/build/icu/source/common/wintz.c 2013-05-03 13:00:47.188384300 +0000 +@@ -255,7 +255,6 @@ + char apiStdName[MAX_LENGTH_ID]; + char regStdName[MAX_LENGTH_ID]; + char tmpid[MAX_LENGTH_ID]; +- int32_t apiStdLength = 0; + int32_t len; + + LONG result; +@@ -278,8 +277,8 @@ + + /* Convert the wchar_t* standard name to char* */ + uprv_memset(apiStdName, 0, sizeof(apiStdName)); +- u_strFromWCS(apiStd, MAX_LENGTH_ID, &apiStdLength, apiTZI.StandardName, -1, &status); +- u_austrncpy(apiStdName, apiStd, apiStdLength); ++ u_strFromWCS(apiStd, MAX_LENGTH_ID, NULL, apiTZI.StandardName, -1, &status); ++ u_austrncpy(apiStdName, apiStd, sizeof(apiStdName) - 1); + + tmpid[0] = 0; + diff --git a/icu/makefile.mk b/icu/makefile.mk index d6a73f9..8710b8b 100644 --- a/icu/makefile.mk +++ b/icu/makefile.mk @@ -43,6 +43,7 @@ TARFILE_ROOTDIR=icu #http://bugs.icu-project.org/trac/ticket/8320 for crash with FreeSerif PATCH_FILES=\ + icu4c.10129.wintz.patch \ icu4c-build.patch \ icu4c.8320.freeserif.crash.patch \ icu4c-aix.patch \ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits