mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[NTOSKRNL]
* Properly fail when the read pointer is out of the file. Brought to you by Sergey Chernov. CORE-7249 #resolve #comment Committed in r59133. Thanks ! svn path=/trunk/; revision=59133
This commit is contained in:
parent
60bd85ff6c
commit
6dfd719ee8
1 changed files with 3 additions and 1 deletions
4
reactos/ntoskrnl/cache/section/io.c
vendored
4
reactos/ntoskrnl/cache/section/io.c
vendored
|
@ -187,7 +187,9 @@ MiSimpleRead(PFILE_OBJECT FileObject,
|
|||
}
|
||||
|
||||
DPRINT("Paging IO Done: %08x\n", ReadStatus->Status);
|
||||
Status = ReadStatus->Status == STATUS_END_OF_FILE ? STATUS_SUCCESS : ReadStatus->Status;
|
||||
/* When "ReadStatus->Information > 0" is false and "ReadStatus->Status == STATUS_END_OF_FILE" is true
|
||||
* it means that read pointer is out of file, so we must fail */
|
||||
Status = ReadStatus->Status == STATUS_END_OF_FILE && ReadStatus->Information > 0 ? STATUS_SUCCESS : ReadStatus->Status;
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue