[gnome-continuous-yocto/gnomeostree-3.28-rocko: 5946/8267] icu: Use LARGE_BUFFER_MAX_SIZE for cmd



commit c6e8ce853013c3e51b47f75d073fd148e60bf03b
Author: Jackie Huang <jackie huang windriver com>
Date:   Wed May 10 14:29:11 2017 +0800

    icu: Use LARGE_BUFFER_MAX_SIZE for cmd
    
    The previous patch used LARGE_BUFFER_MAX_SIZE instead
    of SMALL_BUFFER_MAX_SIZE for cmd in function pkg_installLibrary,
    which only fixed some of the cases when the command line
    is too long, some other cases indicate that the
    LARGE_BUFFER_MAX_SIZE is also needed in pkg_installCommonMode
    and pkg_installFileMode to avoid overflow:
    
    | *** buffer overflow detected ***: ../bin/pkgdata terminated
    
    (From OE-Core rev: 2c3ec6b3c4e8faf9cf88ae33727b4fecef83d0f8)
    
    Signed-off-by: Jackie Huang <jackie huang windriver com>
    Signed-off-by: Ross Burton <ross burton intel com>
    Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>

 .../icu/icu/icu-pkgdata-large-cmd.patch            |   28 +++++++++++++++++---
 1 files changed, 24 insertions(+), 4 deletions(-)
---
diff --git a/meta/recipes-support/icu/icu/icu-pkgdata-large-cmd.patch 
b/meta/recipes-support/icu/icu/icu-pkgdata-large-cmd.patch
index 6e40659..e758a62 100644
--- a/meta/recipes-support/icu/icu/icu-pkgdata-large-cmd.patch
+++ b/meta/recipes-support/icu/icu/icu-pkgdata-large-cmd.patch
@@ -8,14 +8,16 @@ 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 |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+ 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
-@@ -1019,7 +1019,7 @@ normal_symlink_mode:
+@@ -1084,7 +1084,7 @@ normal_symlink_mode:
  
  static int32_t pkg_installLibrary(const char *installDir, const char *targetDir, UBool noVersion) {
      int32_t result = 0;
@@ -24,6 +26,24 @@ diff --git a/tools/pkgdata/pkgdata.cpp b/tools/pkgdata/pkgdata.cpp
  
      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.7.10.4
+1.9.1
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]