mirror of
https://github.com/reactos/reactos.git
synced 2024-11-17 12:27:17 +00:00
- Do not create cache segments after the end of a file.
svn path=/trunk/; revision=4855
This commit is contained in:
parent
5143077b97
commit
705db1eb52
1 changed files with 7 additions and 1 deletions
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: view.c,v 1.60 2003/05/25 21:49:04 hbirr Exp $
|
||||
/* $Id: view.c,v 1.61 2003/06/06 21:02:42 hbirr Exp $
|
||||
*
|
||||
* PROJECT: ReactOS kernel
|
||||
* FILE: ntoskrnl/cc/view.c
|
||||
|
@ -466,6 +466,12 @@ CcRosCreateCacheSegment(PBCB Bcb,
|
|||
|
||||
DPRINT("CcRosCreateCacheSegment()\n");
|
||||
|
||||
if (FileOffset >= Bcb->FileSize.u.LowPart)
|
||||
{
|
||||
CacheSeg = NULL;
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
current = ExAllocateFromNPagedLookasideList(&CacheSegLookasideList);
|
||||
current->Valid = FALSE;
|
||||
current->Dirty = FALSE;
|
||||
|
|
Loading…
Reference in a new issue