Index: /icu/trunk/source/common/uresbund.cpp =================================================================== --- /icu/trunk/source/common/uresbund.cpp (revision 35698) +++ /icu/trunk/source/common/uresbund.cpp (revision 35699) @@ -1,5 +1,5 @@ /* ****************************************************************************** -* Copyright (C) 1997-2013, International Business Machines Corporation and +* Copyright (C) 1997-2014, International Business Machines Corporation and * others. All Rights Reserved. ****************************************************************************** @@ -37,4 +37,5 @@ #include "uassert.h" +using namespace icu; /* @@ -1733,6 +1734,6 @@ if(res == RES_BOGUS) { UResourceDataEntry *dataEntry = resB->fData; - char path[256]; - char* myPath = path; + CharString path; + char *myPath = NULL; const char* resPath = resB->fResPath; int32_t len = resB->fResPathLen; @@ -1742,9 +1743,14 @@ if(dataEntry->fBogus == U_ZERO_ERROR) { + path.clear(); if (len > 0) { - uprv_memcpy(path, resPath, len); + path.append(resPath, len, *status); } - uprv_strcpy(path+len, inKey); - myPath = path; + path.append(inKey, *status); + if (U_FAILURE(*status)) { + ures_close(helper); + return fillIn; + } + myPath = path.data(); key = inKey; do {