]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/tools/makeconv/makeconv.c
ICU-531.48.tar.gz
[apple/icu.git] / icuSources / tools / makeconv / makeconv.c
index ea1e442f6a9dca125e47dca64f325164dc3d7f83..424c962251138ce7dc9de7cb865fe198d689f0d6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  ********************************************************************************
  *
 /*
  ********************************************************************************
  *
- *   Copyright (C) 1998-2010, International Business Machines
+ *   Copyright (C) 1998-2012, International Business Machines
  *   Corporation and others.  All Rights Reserved.
  *
  ********************************************************************************
  *   Corporation and others.  All Rights Reserved.
  *
  ********************************************************************************
@@ -245,7 +245,7 @@ int main(int argc, char* argv[])
     }
 
     if(options[OPT_VERSION].doesOccur) {
     }
 
     if(options[OPT_VERSION].doesOccur) {
-        printf("makeconv version %hu.%hu, ICU tool to read .ucm codepage mapping files and write .cnv files\n",
+        printf("makeconv version %u.%u, ICU tool to read .ucm codepage mapping files and write .cnv files\n",
                dataInfo.formatVersion[0], dataInfo.formatVersion[1]);
         printf("%s\n", U_COPYRIGHT_STRING);
         exit(0);
                dataInfo.formatVersion[0], dataInfo.formatVersion[1]);
         printf("%s\n", U_COPYRIGHT_STRING);
         exit(0);
@@ -293,7 +293,7 @@ int main(int argc, char* argv[])
         arg = getLongPathname(*argv);
 
         /* Check for potential buffer overflow */
         arg = getLongPathname(*argv);
 
         /* Check for potential buffer overflow */
-        if(strlen(arg) > UCNV_MAX_FULL_FILE_NAME_LENGTH)
+        if(strlen(arg) >= UCNV_MAX_FULL_FILE_NAME_LENGTH)
         {
             fprintf(stderr, "%s\n", u_errorName(U_BUFFER_OVERFLOW_ERROR));
             return U_BUFFER_OVERFLOW_ERROR;
         {
             fprintf(stderr, "%s\n", u_errorName(U_BUFFER_OVERFLOW_ERROR));
             return U_BUFFER_OVERFLOW_ERROR;
@@ -433,7 +433,7 @@ readHeader(ConvData *data,
            FileStream* convFile,
            const char* converterName,
            UErrorCode *pErrorCode) {
            FileStream* convFile,
            const char* converterName,
            UErrorCode *pErrorCode) {
-    char line[200];
+    char line[1024];
     char *s, *key, *value;
     const UConverterStaticData *prototype;
     UConverterStaticData *staticData;
     char *s, *key, *value;
     const UConverterStaticData *prototype;
     UConverterStaticData *staticData;
@@ -560,7 +560,7 @@ readHeader(ConvData *data,
 static UBool
 readFile(ConvData *data, const char* converterName,
          UErrorCode *pErrorCode) {
 static UBool
 readFile(ConvData *data, const char* converterName,
          UErrorCode *pErrorCode) {
-    char line[200];
+    char line[1024];
     char *end;
     FileStream *convFile;
 
     char *end;
     FileStream *convFile;