Author: gadamopoulos
Date: Sat Aug 20 09:43:09 2016
New Revision: 72398
URL: http://svn.reactos.org/svn/reactos?rev=72398&view=rev
Log:
[SHELL32]
- Fail to delete any file if one is invalid.
- Patch by andy-123
CORE-9959
Modified:
trunk/reactos/dll/win32/shell32/shlfileop.cpp
Modified: trunk/reactos/dll/win32/shell32/shlfileop.cpp
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shlfileo…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shlfileop.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shlfileop.cpp [iso-8859-1] Sat Aug 20 09:43:09 2016
@@ -1480,6 +1480,19 @@
return 0;
}
+ /* Check files. Do not delete one if one file does not exists */
+ for (i = 0; i < flFrom->dwNumFiles; i++)
+ {
+ fileEntry = &flFrom->feFiles[i];
+
+ if ((HANDLE)fileEntry->attributes == INVALID_HANDLE_VALUE)
+ {
+ // This is a windows 2003 server specific value which has been removed.
+ // Later versions of windows return ERROR_FILE_NOT_FOUND.
+ return ERROR_SHELL_INTERNAL_FILE_NOT_FOUND;
+ }
+ }
+
for (i = 0; i < flFrom->dwNumFiles; i++)
{
bPathExists = TRUE;
@@ -1527,7 +1540,7 @@
{
// This is a windows 2003 server specific value which ahs been removed.
// Later versions of windows return ERROR_FILE_NOT_FOUND.
- return 1026;
+ return ERROR_SHELL_INTERNAL_FILE_NOT_FOUND;
}
else
{
Author: vmikayelyan
Date: Fri Aug 19 16:56:35 2016
New Revision: 72393
URL: http://svn.reactos.org/svn/reactos?rev=72393&view=rev
Log:
usb: hub: PDO: InternalDeviceControl can be called in DPC
As InternalDeviceControl can be called in DPC, we should avoid scanning
of parent's child list because it uses guarded mutex for
synchronization. So here we just adding new checking for safety and
removing isValidPDO() call.
Modified:
branches/GSoC_2016/USB/drivers/usb/usbhub/pdo.c
Modified: branches/GSoC_2016/USB/drivers/usb/usbhub/pdo.c
URL: http://svn.reactos.org/svn/reactos/branches/GSoC_2016/USB/drivers/usb/usbhu…
==============================================================================
--- branches/GSoC_2016/USB/drivers/usb/usbhub/pdo.c [iso-8859-1] (original)
+++ branches/GSoC_2016/USB/drivers/usb/usbhub/pdo.c [iso-8859-1] Fri Aug 19 16:56:35 2016
@@ -210,7 +210,7 @@
if (ChildDeviceExtension->Common.PnPState == SurpriseRemovePending ||
ChildDeviceExtension->Common.PnPState == RemovePending ||
- !IsValidPDO(DeviceObject))
+ ChildDeviceExtension->ParentDeviceObject == NULL)
{
// Parent or child device was surprise removed.
DPRINT1("[USBHUB] Request for removed device object %p\n", DeviceObject);