Author: pschweitzer
Date: Sun Jul 30 08:31:59 2017
New Revision: 75443
URL:
http://svn.reactos.org/svn/reactos?rev=75443&view=rev
Log:
[KERNEL32]
In case of synchronous read, it's legit for the FSD to notify EOF by returning success
& zero read length.
It fixes never ending reads when copying a file from NFS to local disk.
CORE-8204
CORE-11327
CORE-13484
Modified:
trunk/reactos/dll/win32/kernel32/client/file/copy.c
Modified: trunk/reactos/dll/win32/kernel32/client/file/copy.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/file/copy.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/file/copy.c [iso-8859-1] Sun Jul 30 08:31:59
2017
@@ -101,6 +101,13 @@
RegionSize,
NULL,
NULL);
+ /* With sync read, 0 length + status success mean EOF:
+ *
https://msdn.microsoft.com/en-us/library/windows/desktop/aa365467(v=vs.85).…
+ */
+ if (NT_SUCCESS(errCode) && IoStatusBlock.Information == 0)
+ {
+ errCode = STATUS_END_OF_FILE;
+ }
if (NT_SUCCESS(errCode) && (NULL == pbCancel || ! *pbCancel))
{
errCode = NtWriteFile(FileHandleDest,