mirror of
https://github.com/openharmony/js_util_module.git
synced 2026-07-19 18:23:35 -04:00
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:
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user