mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-29 04:13:32 +00:00
[SHELL32]
- Fix a use after free in COpenWithMenu::Initialize. Powered by DPH. svn path=/trunk/; revision=65156
This commit is contained in:
@@ -1334,6 +1334,14 @@ COpenWithMenu::Initialize(LPCITEMIDLIST pidlFolder,
|
||||
pidlFolder2 = (LPCITEMIDLIST) ((LPBYTE)pida + pida->aoffset[0]);
|
||||
pidlChild = (LPCITEMIDLIST) ((LPBYTE)pida + pida->aoffset[1]);
|
||||
|
||||
if (!_ILIsValue(pidlChild))
|
||||
{
|
||||
TRACE("pidl is not a file\n");
|
||||
GlobalUnlock(medium.hGlobal);
|
||||
GlobalFree(medium.hGlobal);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
pidl = ILCombine(pidlFolder2, pidlChild);
|
||||
|
||||
GlobalUnlock(medium.hGlobal);
|
||||
@@ -1344,12 +1352,6 @@ COpenWithMenu::Initialize(LPCITEMIDLIST pidlFolder,
|
||||
ERR("no mem\n");
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
if (!_ILIsValue(pidlChild))
|
||||
{
|
||||
TRACE("pidl is not a file\n");
|
||||
SHFree((void*)pidl);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (!SHGetPathFromIDListW(pidl, m_wszPath))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user