summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/icu/icu/icu-pkgdata-large-cmd.patch
blob: e758a623ef4c8b3af18c425ec32ec0d0a1260700 (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
pkgdata.cpp: use LARGE_BUFFER_MAX_SIZE for cmd

Use LARGE_BUFFER_MAX_SIZE for cmd rather than SMALL_BUFFER_MAX_SIZE,
otherwise there was a Segmentation fault error when the command line is
long, this should be a misplay since other cmd uses
LARGE_BUFFER_MAX_SIZE.

Upstream-Status: Pending

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
 tools/pkgdata/pkgdata.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/pkgdata/pkgdata.cpp b/tools/pkgdata/pkgdata.cpp
index 60167dd..506dd32 100644
--- a/tools/pkgdata/pkgdata.cpp
+++ b/tools/pkgdata/pkgdata.cpp
@@ -1084,7 +1084,7 @@ normal_symlink_mode:
 
 static int32_t pkg_installLibrary(const char *installDir, const char *targetDir, UBool noVersion) {
     int32_t result = 0;
-    char cmd[SMALL_BUFFER_MAX_SIZE];
+    char cmd[LARGE_BUFFER_MAX_SIZE];
 
     sprintf(cmd, "cd %s && %s %s %s%s%s",
             targetDir,
@@ -1152,7 +1152,7 @@ static int32_t pkg_installLibrary(const char *installDir, const char *targetDir,
 
 static int32_t pkg_installCommonMode(const char *installDir, const char *fileName) {
     int32_t result = 0;
-    char cmd[SMALL_BUFFER_MAX_SIZE] = "";
+    char cmd[LARGE_BUFFER_MAX_SIZE] = "";
 
     if (!T_FileStream_file_exists(installDir)) {
         UErrorCode status = U_ZERO_ERROR;
@@ -1184,7 +1184,7 @@ static int32_t pkg_installCommonMode(const char *installDir, const char *fileNam
 #endif
 static int32_t pkg_installFileMode(const char *installDir, const char *srcDir, const char *fileListName) {
     int32_t result = 0;
-    char cmd[SMALL_BUFFER_MAX_SIZE] = "";
+    char cmd[LARGE_BUFFER_MAX_SIZE] = "";
 
     if (!T_FileStream_file_exists(installDir)) {
         UErrorCode status = U_ZERO_ERROR;
-- 
1.9.1