Author: akhaldi
Date: Fri Jun 5 17:57:28 2015
New Revision: 68024
URL:
http://svn.reactos.org/svn/reactos?rev=68024&view=rev
Log:
[NTOSKRNL] Fix NtQuerySystemInformation not returning correct ResultLength for
SystemFileCacheInformation. Fixes tons of ntdll:info tests. Brought to you by Tetsui
Ohkubo. CORE-9757
Modified:
trunk/reactos/ntoskrnl/ex/sysinfo.c
Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/sysinfo.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/ex/sysinfo.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ex/sysinfo.c [iso-8859-1] Fri Jun 5 17:57:28 2015
@@ -1291,9 +1291,10 @@
{
SYSTEM_FILECACHE_INFORMATION *Sci = (SYSTEM_FILECACHE_INFORMATION *) Buffer;
- if (Size < sizeof(SYSTEM_FILECACHE_INFORMATION))
- {
- *ReqSize = sizeof(SYSTEM_FILECACHE_INFORMATION);
+ *ReqSize = sizeof(SYSTEM_FILECACHE_INFORMATION);
+
+ if (Size < *ReqSize)
+ {
return STATUS_INFO_LENGTH_MISMATCH;
}