[NTOSKRNL] Properly initialize the IO_STATUS_BLOCK
authorPierre Schweitzer <pierre@reactos.org>
Fri, 17 Aug 2018 17:12:30 +0000 (19:12 +0200)
committerPierre Schweitzer <pierre@reactos.org>
Fri, 17 Aug 2018 17:13:13 +0000 (19:13 +0200)
ntoskrnl/fsrtl/fastio.c

index d3ea273..c9ff2f0 100644 (file)
@@ -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;
     }