https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a66bee2837e4bed6f5940…
commit a66bee2837e4bed6f5940bad22667a4b5d4a6603
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Sun Sep 8 15:40:46 2019 +0200
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Sun Sep 29 12:42:26 2019 +0200
[SHELLFOLDERS] Gracefully handle NULL pidl in CDrivesFolder::BindToObject. CORE-16403
Fixes one of many crashes in shell32_winetest:shlfolder.
---
dll/win32/shell32/folders/CDrivesFolder.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dll/win32/shell32/folders/CDrivesFolder.cpp
b/dll/win32/shell32/folders/CDrivesFolder.cpp
index ccb0b52883c..d8c35a79150 100644
--- a/dll/win32/shell32/folders/CDrivesFolder.cpp
+++ b/dll/win32/shell32/folders/CDrivesFolder.cpp
@@ -536,6 +536,9 @@ HRESULT WINAPI CDrivesFolder::BindToObject(PCUIDLIST_RELATIVE pidl,
LPBC pbcRese
TRACE("(%p)->(pidl=%p,%p,%s,%p)\n", this,
pidl, pbcReserved, shdebugstr_guid(&riid), ppvOut);
+ if (!pidl)
+ return E_INVALIDARG;
+
if (_ILIsSpecialFolder(pidl))
return m_regFolder->BindToObject(pidl, pbcReserved, riid, ppvOut);