[NTOSKRNL] Fix NtQuerySystemInformation not returning correct ResultLength for System...
authorAmine Khaldi <amine.khaldi@reactos.org>
Fri, 5 Jun 2015 17:57:28 +0000 (17:57 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Fri, 5 Jun 2015 17:57:28 +0000 (17:57 +0000)
svn path=/trunk/; revision=68024

reactos/ntoskrnl/ex/sysinfo.c

index d2bbac4..5a00c12 100644 (file)
@@ -1291,9 +1291,10 @@ QSI_DEF(SystemFileCacheInformation)
 {
     SYSTEM_FILECACHE_INFORMATION *Sci = (SYSTEM_FILECACHE_INFORMATION *) Buffer;
 
-    if (Size < sizeof(SYSTEM_FILECACHE_INFORMATION))
+    *ReqSize = sizeof(SYSTEM_FILECACHE_INFORMATION);
+
+    if (Size < *ReqSize)
     {
-        *ReqSize = sizeof(SYSTEM_FILECACHE_INFORMATION);
         return STATUS_INFO_LENGTH_MISMATCH;
     }