mirror of
https://gitee.com/openharmony/arkcompiler_toolchain
synced 2024-11-23 15:40:03 +00:00
Security standard alarm processing
Signed-off-by: shiminnan@huawei.com <shiminnan@huawei.com>
This commit is contained in:
parent
5e84199515
commit
b627cccd0f
@ -1854,7 +1854,7 @@ Local<JSValueRef> DebuggerImpl::ConvertToLocal(const std::string &varValue)
|
||||
taggedValue = JSValueRef::True(vm_);
|
||||
} else if (varValue == "undefined") {
|
||||
taggedValue = JSValueRef::Undefined(vm_);
|
||||
} else if (varValue[0] == '\"' && varValue[varValue.length() - 1] == '\"') {
|
||||
} else if (!varValue.empty() && varValue[0] == '\"' && varValue[varValue.length() - 1] == '\"') {
|
||||
// 2 : 2 means length
|
||||
taggedValue = StringRef::NewFromUtf8(vm_, varValue.substr(1, varValue.length() - 2).c_str());
|
||||
} else {
|
||||
|
@ -73,6 +73,7 @@ bool PtJson::Add(const char *key, bool value) const
|
||||
return false;
|
||||
}
|
||||
|
||||
cJSON_Delete(node);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -106,6 +107,7 @@ bool PtJson::Add(const char *key, double value) const
|
||||
return false;
|
||||
}
|
||||
|
||||
cJSON_Delete(node);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -124,6 +126,7 @@ bool PtJson::Add(const char *key, const char *value) const
|
||||
return false;
|
||||
}
|
||||
|
||||
cJSON_Delete(node);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -157,6 +160,7 @@ bool PtJson::Push(bool value) const
|
||||
return false;
|
||||
}
|
||||
|
||||
cJSON_Delete(node);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -188,6 +192,7 @@ bool PtJson::Push(double value) const
|
||||
return false;
|
||||
}
|
||||
|
||||
cJSON_Delete(node);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -204,6 +209,7 @@ bool PtJson::Push(const char *value) const
|
||||
return false;
|
||||
}
|
||||
|
||||
cJSON_Delete(node);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -118,6 +118,7 @@ void GetInputCommand([[maybe_unused]] void *arg)
|
||||
if (uv_is_active(reinterpret_cast<uv_handle_t*>(g_releaseHandle))) {
|
||||
uv_async_send(g_releaseHandle);
|
||||
}
|
||||
free(msg);
|
||||
break;
|
||||
}
|
||||
g_inputSignal->data = std::move(msg);
|
||||
|
@ -237,7 +237,7 @@ void HeapProfilerClient::RecvReply(std::unique_ptr<PtJson> json)
|
||||
std::string wholeMethod;
|
||||
std::string method;
|
||||
ret = json->GetString("method", &wholeMethod);
|
||||
if (ret != Result::SUCCESS) {
|
||||
if (ret != Result::SUCCESS || wholeMethod.empty()) {
|
||||
LOGE("find method error");
|
||||
return;
|
||||
}
|
||||
|
@ -55,6 +55,10 @@ void DomainManager::DispatcherReply(char* msg)
|
||||
|
||||
std::string wholeMethod;
|
||||
ret = json->GetString("method", &wholeMethod);
|
||||
if (wholeMethod.empty()) {
|
||||
LOGE("find method empty");
|
||||
return;
|
||||
}
|
||||
if (ret == Result::SUCCESS) {
|
||||
std::string::size_type length = wholeMethod.length();
|
||||
std::string::size_type indexPoint = 0;
|
||||
|
@ -59,7 +59,7 @@ DispatchRequest::DispatchRequest(const std::string &message)
|
||||
|
||||
std::string wholeMethod;
|
||||
ret = json->GetString("method", &wholeMethod);
|
||||
if (ret != Result::SUCCESS) {
|
||||
if (ret != Result::SUCCESS || wholeMethod.empty()) {
|
||||
code_ = RequestCode::PARSE_METHOD_ERROR;
|
||||
LOG_DEBUGGER(ERROR) << "parse method error";
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user