mirror of
https://github.com/reactos/reactos.git
synced 2024-11-28 05:53:31 +08:00
[NTOBJSHEX] Return early from GetInfoFromPidl when pcidl is null in LPCITEMIDLIST (#4946)
This fixes a crash when attempting to drag-n-drop items from NTObject Namespace and System Registry. CORE-18480, CORE-18481
This commit is contained in:
parent
d395c30967
commit
7fff96e7fe
@ -516,8 +516,13 @@ BOOL CNtObjectFolder::IsFolder(const NtPidlEntry * info)
|
||||
|
||||
HRESULT CNtObjectFolder::GetInfoFromPidl(LPCITEMIDLIST pcidl, const NtPidlEntry ** pentry)
|
||||
{
|
||||
NtPidlEntry * entry = (NtPidlEntry*) &(pcidl->mkid);
|
||||
if (!pcidl)
|
||||
{
|
||||
DbgPrint("PCIDL is NULL\n");
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
NtPidlEntry * entry = (NtPidlEntry*) &(pcidl->mkid);
|
||||
if (entry->cb < sizeof(NtPidlEntry))
|
||||
{
|
||||
DbgPrint("PCIDL too small %l (required %l)\n", entry->cb, sizeof(NtPidlEntry));
|
||||
|
@ -469,8 +469,13 @@ BOOL CRegistryFolder::IsFolder(const RegPidlEntry * info)
|
||||
|
||||
HRESULT CRegistryFolder::GetInfoFromPidl(LPCITEMIDLIST pcidl, const RegPidlEntry ** pentry)
|
||||
{
|
||||
RegPidlEntry * entry = (RegPidlEntry*) &(pcidl->mkid);
|
||||
if (!pcidl)
|
||||
{
|
||||
DbgPrint("PCIDL is NULL\n");
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
RegPidlEntry * entry = (RegPidlEntry*) &(pcidl->mkid);
|
||||
if (entry->cb < sizeof(RegPidlEntry))
|
||||
{
|
||||
DbgPrint("PCIDL too small %l (required %l)\n", entry->cb, sizeof(RegPidlEntry));
|
||||
|
Loading…
Reference in New Issue
Block a user