[PATCH 2/3] ntdll: Don't return an error when reading past EOF in NtReadFileScatter
Thomas Faber
thomas.faber at reactos.org
Thu Nov 30 03:43:41 CST 2017
On 2017-11-29 19:52, Andrew Eikum wrote:
> diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
> index bdfc383d7e..f7db24cc8b 100644
> --- a/dlls/ntdll/file.c
> +++ b/dlls/ntdll/file.c
> @@ -1071,10 +1071,7 @@ NTSTATUS WINAPI NtReadFileScatter( HANDLE file, HANDLE event, PIO_APC_ROUTINE ap
> break;
> }
> if (!result)
> - {
> - status = STATUS_END_OF_FILE;
> break;
> - }
> total += result;
> length -= result;
> if ((pos += result) == page_size)
>
I think your conclusion from the test may be overly broad.
The regular NtReadFile only returns STATUS_END_OF_FILE if the file
pointer was already at EOF, i.e. if no data was read.
It seems likely the Scatter version would do the same, so another test
that starts reading at or beyond EOF should still return
STATUS_END_OF_FILE.
Best,
Thomas
More information about the wine-devel
mailing list