mirror of
https://github.com/reactos/reactos.git
synced 2026-06-01 08:50:24 +08:00
[SHELL32] Translating PIDLs: Check NULL and fix PIDL flags update (#8603)
#8569 introduced an exception bug. JIRA issue: CORE-20441 - In CreateNotificationParamAndSend function, check NULL for PIDLs. - In SHELL32_ReparentAsAliasPidl function, fix updating PIDL flags.
This commit is contained in:
committed by
GitHub
parent
eafe25143b
commit
ba1e474a98
@@ -342,8 +342,8 @@ CreateNotificationParamAndSend(LONG wEventId, UINT uFlags, LPCITEMIDLIST pidl1,
|
||||
SHELL32_AliasTranslatePidl(pidl2, &pidl2Alias, ALIAS_ANY);
|
||||
|
||||
HANDLE hTicket2 = NULL;
|
||||
if ((pidl1Alias || pidl2Alias) &&
|
||||
(!ILIsEqual(pidl1, pidl1Alias) || !ILIsEqual(pidl2, pidl2Alias)))
|
||||
if (((pidl1 && pidl1Alias && !ILIsEqual(pidl1, pidl1Alias)) ||
|
||||
(pidl2 && pidl2Alias && !ILIsEqual(pidl2, pidl2Alias))))
|
||||
{
|
||||
hTicket2 = CreateNotificationParam(wEventId, uFlags, pidl1Alias, pidl2Alias,
|
||||
pid, dwTick);
|
||||
|
||||
@@ -2165,11 +2165,9 @@ SHELL32_ReparentAsAliasPidl(
|
||||
if (*ppidlNew)
|
||||
{
|
||||
// Manipulate specific flags in the PIDL if necessary
|
||||
if (pEntry->bCommonDesktop && (*ppidlNew)->mkid.cb)
|
||||
if (pEntry->bCommonDesktop && (*ppidlNew)->mkid.cb >= 3)
|
||||
{
|
||||
UINT cbRoot = ILGetSize(pidlDestRoot);
|
||||
PBYTE pAttr = (PBYTE)(*ppidlNew) + cbRoot - sizeof(USHORT);
|
||||
*pAttr |= (PT_FS | PT_FS_COMMON_FLAG);
|
||||
(*ppidlNew)->mkid.abID[0] |= (PT_FS | PT_FS_COMMON_FLAG);
|
||||
}
|
||||
}
|
||||
ILFree(pidlDestRoot);
|
||||
|
||||
Reference in New Issue
Block a user