utilxts bugfix

issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I5IJY3?from=project-issue
1. u_getDataDirectory() is not thread-safe.It should be called at most once in a process
2. buffer write overflow

Signed-off-by: lukai <lukai25@huawei.com>
This commit is contained in:
lukai
2022-07-23 14:57:10 +08:00
parent 048338dd31
commit 7a691e9262
2 changed files with 0 additions and 3 deletions
-2
View File
@@ -456,8 +456,6 @@ namespace OHOS::Util {
inputDecode = static_cast<char*>(resultData) + byteOffset;
CreateDecodePromise(env, inputDecode, length);
}
delete[] inputString;
inputString = nullptr;
return stdDecodeInfo_->promise;
}
void Base64::CreateDecodePromise(napi_env env, char *inputDecode, size_t length)
-1
View File
@@ -42,7 +42,6 @@ namespace OHOS::Util {
}
}
label_ = i32Flag;
SetHwIcuDirectory();
bool fatal =
(i32Flag & static_cast<uint32_t>(ConverterFlags::FATAL_FLG)) ==
static_cast<uint32_t>(ConverterFlags::FATAL_FLG);