fix:添加白名单校验

Signed-off-by: weimengxue <weimengxue1@h-partners.com>
This commit is contained in:
weimengxue 2024-11-07 12:36:08 +00:00
parent 660304a523
commit 74395759ee

View File

@ -873,7 +873,15 @@ void BinderInvoker::OnRemoveRecipientDone()
uintptr_t cookie = input_.ReadPointer();
auto *proxy = reinterpret_cast<IPCObjectProxy *>(cookie);
if (proxy != nullptr) {
proxy->DecStrongRef(this);
ProcessSkeleton *current = ProcessSkeleton::GetInstance();
std::u16string desc;
if ((current != nullptr) && !current->IsValidObject(proxy, desc)) {
ZLOGE(LABEL, "%{public}u is invalid", ProcessSkeleton::ConvertAddr(proxy));
} else {
std::string descTemp = Str16ToStr8(desc);
CrashObjDumper dumper(descTemp.c_str());
proxy->DecStrongRef(this);
}
}
}