Author: tfaber
Date: Wed Oct 7 10:23:06 2015
New Revision: 69462
URL:
http://svn.reactos.org/svn/reactos?rev=69462&view=rev
Log:
[NTOBJSHEX]
- Correctly handle NULL ppidl in EnumerateNext as required by Skip() callers
- Don't reenumerate NT directories every time EnumerateNext is called from Skip()
CORE-10311 #resolve
Modified:
trunk/reactos/dll/shellext/ntobjshex/ntobjenum.cpp
Modified: trunk/reactos/dll/shellext/ntobjshex/ntobjenum.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/ntobjshex/nto…
==============================================================================
--- trunk/reactos/dll/shellext/ntobjshex/ntobjenum.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/shellext/ntobjshex/ntobjenum.cpp [iso-8859-1] Wed Oct 7 10:23:06
2015
@@ -250,7 +250,8 @@
entry->cb += sizeof(WCHAR);
}
- *ppidl = (LPITEMIDLIST) entry;
+ if (ppidl)
+ *ppidl = (LPITEMIDLIST) entry;
return S_OK;
}
@@ -409,7 +410,8 @@
entry->cb += entry->contentsLength + sizeof(WCHAR);
}
- *ppidl = (LPITEMIDLIST) entry;
+ if (ppidl)
+ *ppidl = (LPITEMIDLIST) entry;
return S_OK;
}
@@ -480,7 +482,8 @@
}
- *ppidl = (LPITEMIDLIST) entry;
+ if (ppidl)
+ *ppidl = (LPITEMIDLIST) entry;
return S_OK;
}
@@ -596,12 +599,13 @@
if (!NT_SUCCESS(NtQueryDirectoryObject(m_directory, dirbuffer, 2048, TRUE,
m_first, &m_enumContext, NULL)))
return S_FALSE;
+ m_first = FALSE;
+
// if ppidl is NULL, assume the caller was Skip(),
// so we don't care about the info
if (!ppidl)
return S_OK;
- m_first = FALSE;
POBJECT_DIRECTORY_INFORMATION info = (POBJECT_DIRECTORY_INFORMATION) dirbuffer;
if (info->Name.Buffer)