Skip to content

Commit a66bee2

Browse files
committed
[SHELLFOLDERS] Gracefully handle NULL pidl in CDrivesFolder::BindToObject. CORE-16403
Fixes one of many crashes in shell32_winetest:shlfolder.
1 parent ed9f0dc commit a66bee2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

dll/win32/shell32/folders/CDrivesFolder.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,9 @@ HRESULT WINAPI CDrivesFolder::BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcRese
536536
TRACE("(%p)->(pidl=%p,%p,%s,%p)\n", this,
537537
pidl, pbcReserved, shdebugstr_guid(&riid), ppvOut);
538538

539+
if (!pidl)
540+
return E_INVALIDARG;
541+
539542
if (_ILIsSpecialFolder(pidl))
540543
return m_regFolder->BindToObject(pidl, pbcReserved, riid, ppvOut);
541544

0 commit comments

Comments
 (0)