From 65f97838084a5b1541f80c5ab4236495ae9b3ce0 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Fri, 17 Aug 2018 19:12:30 +0200 Subject: [PATCH] [NTOSKRNL] Properly initialize the IO_STATUS_BLOCK --- ntoskrnl/fsrtl/fastio.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ntoskrnl/fsrtl/fastio.c b/ntoskrnl/fsrtl/fastio.c index d3ea273a128..c9ff2f03752 100644 --- a/ntoskrnl/fsrtl/fastio.c +++ b/ntoskrnl/fsrtl/fastio.c @@ -310,11 +310,13 @@ FsRtlCopyWrite(IN PFILE_OBJECT FileObject, return FALSE; } + /* Already init IO_STATUS_BLOCK */ + IoStatus->Status = STATUS_SUCCESS; + IoStatus->Information = Length; + /* No actual read */ if (!Length) { - IoStatus->Status = STATUS_SUCCESS; - IoStatus->Information = Length; return TRUE; }