]> granicus.if.org Git - icu/commitdiff
ICU-10808 Fix some array size limitation when calling pkgdata tool
authorMichael Ow <mow@svn.icu-project.org>
Wed, 23 Apr 2014 21:29:23 +0000 (21:29 +0000)
committerMichael Ow <mow@svn.icu-project.org>
Wed, 23 Apr 2014 21:29:23 +0000 (21:29 +0000)
X-SVN-Rev: 35648

icu4c/source/tools/toolutil/package.h
icu4c/source/tools/toolutil/pkg_genc.c
icu4c/source/tools/toolutil/toolutil.cpp

index 2cce5df0aa579124ba701216e470c2a8182a001a..5c01be2a15781baa4e9caaf4ba0b77ceb97c31d1 100644 (file)
@@ -1,7 +1,7 @@
 /*
 *******************************************************************************
 *
-*   Copyright (C) 2005-2013, International Business Machines
+*   Copyright (C) 2005-2014, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *
 *******************************************************************************
@@ -26,7 +26,7 @@
 // .dat package file representation ---------------------------------------- ***
 
 #define STRING_STORE_SIZE 100000
-#define MAX_PKG_NAME_LENGTH 32
+#define MAX_PKG_NAME_LENGTH 64
 
 typedef void CheckDependency(void *context, const char *itemName, const char *targetName);
 
index f6d1d8b590c00423ecab8b5bea0508b6bc4ddc64..2a3ee337da5645da706bc70cc05f0c28dca402d2 100644 (file)
@@ -1,5 +1,5 @@
 /******************************************************************************
- *   Copyright (C) 2009-2013, International Business Machines
+ *   Copyright (C) 2009-2014, International Business Machines
  *   Corporation and others.  All Rights Reserved.
  *******************************************************************************
  */
@@ -761,7 +761,7 @@ getArchitecture(uint16_t *pCPU, uint16_t *pBits, UBool *pIsBigEndian, const char
 U_CAPI void U_EXPORT2
 writeObjectCode(const char *filename, const char *destdir, const char *optEntryPoint, const char *optMatchArch, const char *optFilename, char *outFilePath) {
     /* common variables */
-    char buffer[4096], entry[40]={ 0 };
+    char buffer[4096], entry[96]={ 0 };
     FileStream *in, *out;
     const char *newSuffix;
     int32_t i, entryLength, length, size, entryOffset=0, entryLengthOffset=0;
index 0dbdaaeb0ee73f8016b84a1c5ee7223fe6d39a97..6a6ad7d4d1aa876e9842d96f635284163c97ecd4 100644 (file)
@@ -162,7 +162,10 @@ findBasename(const char *filename) {
     const char *basename=uprv_strrchr(filename, U_FILE_SEP_CHAR);
 
 #if U_FILE_ALT_SEP_CHAR!=U_FILE_SEP_CHAR
-    if(basename==NULL) {
+#if !U_PLATFORM_USES_ONLY_WIN32_API && U_PLATFORM != U_PF_CYGWIN
+    if(basename==NULL)
+#endif
+    {
         /* Use lenient matching on Windows, which can accept either \ or /
            This is useful for environments like Win32+CygWin which have both.
         */