blob: e758a623ef4c8b3af18c425ec32ec0d0a1260700 [file] [log] [blame]
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