mirror of
https://github.com/openharmony/developtools_bytrace.git
synced 2026-07-20 01:13:43 -04:00
对StartTrace第三个参数进行null校验
Signed-off-by: chenwei <chenwei469@huawei.com>
This commit is contained in:
@@ -64,7 +64,10 @@ bool ParseStringParam(const napi_env& env, const napi_value& value, std::string&
|
||||
char buf[nameMaxSize] = {0};
|
||||
size_t len = 0;
|
||||
napi_get_value_string_utf8(env, value, buf, nameMaxSize, &len);
|
||||
HiLog::Error(LABEL, "buf: %{public}s.", buf);
|
||||
HiLog::Error(LABEL, "len: %{public}d.", len);
|
||||
dest = std::string {buf};
|
||||
HiLog::Error(LABEL, "dest: %{public}s.", dest.c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user