ICU-12566 Fix limitation of file name size longer than 300 characters

X-SVN-Rev: 38882
This commit is contained in:
Michael Ow 2016-06-24 20:38:24 +00:00
parent a8ef8ffe6f
commit 6398be7e34

View File

@ -203,7 +203,7 @@ main(int argc, char* argv[]) {
#else
setUnicodeVersion(options[UNICODE_VERSION].value);
filename = (char* ) uprv_malloc(uprv_strlen(srcDir) + 300); /* hopefully this should be enough */
filename = (char* ) uprv_malloc(uprv_strlen(srcDir) + uprv_strlen(inputFileName) + 20); /* hopefully this should be enough */
/* prepare the filename beginning with the source dir */
if(uprv_strchr(srcDir,U_FILE_SEP_CHAR) == NULL && uprv_strchr(srcDir,U_FILE_ALT_SEP_CHAR) == NULL){