projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7a88e3b
)
[NTFS] Don't dereference NULL IRP
author
Pierre Schweitzer
<pierre@reactos.org>
Sun, 31 Dec 2017 09:31:12 +0000
(10:31 +0100)
committer
Pierre Schweitzer
<pierre@reactos.org>
Sun, 31 Dec 2017 09:38:58 +0000
(10:38 +0100)
CID
1427057
drivers/filesystems/ntfs/rw.c
patch
|
blob
|
history
diff --git
a/drivers/filesystems/ntfs/rw.c
b/drivers/filesystems/ntfs/rw.c
index
94d05de
..
038caa4
100644
(file)
--- a/
drivers/filesystems/ntfs/rw.c
+++ b/
drivers/filesystems/ntfs/rw.c
@@
-545,6
+545,9
@@
NtfsWrite(PNTFS_IRP_CONTEXT IrpContext)
DPRINT("NtfsWrite(IrpContext %p)\n", IrpContext);
ASSERT(IrpContext);
+ // get the I/O request packet
+ Irp = IrpContext->Irp;
+
// This request is not allowed on the main device object
if (IrpContext->DeviceObject == NtfsGlobalData->DeviceObject)
{
@@
-554,9
+557,6
@@
NtfsWrite(PNTFS_IRP_CONTEXT IrpContext)
return STATUS_INVALID_DEVICE_REQUEST;
}
- // get the I/O request packet
- Irp = IrpContext->Irp;
-
// get the File control block
Fcb = (PNTFS_FCB)IrpContext->FileObject->FsContext;
ASSERT(Fcb);