Author: tfaber
Date: Wed Mar 30 11:11:37 2016
New Revision: 71080
URL:
http://svn.reactos.org/svn/reactos?rev=71080&view=rev
Log:
[SHELL32]
- Correctly handle NULL pidls in CDesktopFolder::CompareIDs and CDrivesFolder::CompareIDs.
Based on a patch by Sylvain Deverre.
CORE-10745 #resolve
CORE-10747
Modified:
trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp
trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.cpp
Modified: trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
==============================================================================
--- trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp [iso-8859-1] Wed Mar 30
11:11:37 2016
@@ -463,6 +463,12 @@
*/
HRESULT WINAPI CDesktopFolder::CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1,
PCUIDLIST_RELATIVE pidl2)
{
+ if (!pidl1 || !pidl2)
+ {
+ ERR("Got null pidl pointer (%Ix %p %p)!\n", lParam, pidl1, pidl2);
+ return E_INVALIDARG;
+ }
+
if (_ILIsSpecialFolder(pidl1) || _ILIsSpecialFolder(pidl2))
return SHELL32_CompareGuidItems(this, lParam, pidl1, pidl2);
Modified: trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
==============================================================================
--- trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.cpp [iso-8859-1] Wed Mar 30
11:11:37 2016
@@ -298,6 +298,12 @@
HRESULT WINAPI CDrivesFolder::CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1,
PCUIDLIST_RELATIVE pidl2)
{
+ if (!pidl1 || !pidl2)
+ {
+ ERR("Got null pidl pointer (%Ix %p %p)!\n", lParam, pidl1, pidl2);
+ return E_INVALIDARG;
+ }
+
if (_ILIsSpecialFolder(pidl1) || _ILIsSpecialFolder(pidl2))
return SHELL32_CompareGuidItems(this, lParam, pidl1, pidl2);