From 6398be7e34e07d85bd959c9c43af0ae09e4eda23 Mon Sep 17 00:00:00 2001 From: Michael Ow Date: Fri, 24 Jun 2016 20:38:24 +0000 Subject: [PATCH] ICU-12566 Fix limitation of file name size longer than 300 characters X-SVN-Rev: 38882 --- icu4c/source/tools/gensprep/gensprep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/icu4c/source/tools/gensprep/gensprep.c b/icu4c/source/tools/gensprep/gensprep.c index a20ee63194c..6d7222c75f3 100644 --- a/icu4c/source/tools/gensprep/gensprep.c +++ b/icu4c/source/tools/gensprep/gensprep.c @@ -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){