summaryrefslogtreecommitdiff
path: root/icu/icu4c.10129.wintz.patch
blob: d365f5e669af23e7ed386f5b138608b773c12630 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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;