mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-30 19:26:05 +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:
Vendored
+3
-1
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user