ICU-1698 crashes.. fix strlen+1 for null termination

X-SVN-Rev: 7593
This commit is contained in:
Ram Viswanadha 2002-02-07 21:47:22 +00:00
parent 91a68ca546
commit 45f30d6ebb

View File

@ -1032,7 +1032,7 @@ static void TestNewConvertWithBufferSizes(int32_t outsize, int32_t insize )
}
static void TestCoverageMBCS(){
char* saveDirectory = (char*)uprv_malloc(sizeof(char) *(strlen(u_getDataDirectory())));
char* saveDirectory = (char*)uprv_malloc(sizeof(char) *(strlen(u_getDataDirectory())+1));
const char *directory;
char* tdpath = NULL;
UErrorCode status = U_ZERO_ERROR;