mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 16:33:02 -05:00
sys: write: FspFsvolWriteCached
- double-check that WriteEndOffset is within file bounds
This commit is contained in:
parent
d2de5e996c
commit
70dd54e114
@ -219,6 +219,13 @@ static NTSTATUS FspFsvolWriteCached(
|
||||
}
|
||||
}
|
||||
|
||||
/* double-check that the end offset is <= than the file size and fail if not */
|
||||
if (WriteEndOffset > (UINT64)CcGetFileSizePointer(FileObject)->QuadPart)
|
||||
{
|
||||
FspFileNodeRelease(FileNode, Main);
|
||||
return STATUS_INTERNAL_ERROR;
|
||||
}
|
||||
|
||||
/*
|
||||
* From this point forward we must jump to the CLEANUP label on failure.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user