Author: cwittich Date: Sat Jun 6 09:36:01 2015 New Revision: 68031
URL: http://svn.reactos.org/svn/reactos?rev=68031&view=rev Log: [NTOSKRNL] do not set ReturnLength in ProcessWow64Information error case add size check in PROCESSOR_POWER_INFORMATION stub
Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c trunk/reactos/ntoskrnl/ps/query.c
Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/sysinfo.c?rev=6... ============================================================================== --- trunk/reactos/ntoskrnl/ex/sysinfo.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/sysinfo.c [iso-8859-1] Sat Jun 6 09:36:01 2015 @@ -1839,6 +1839,13 @@ /* Class 42 - Power Information */ QSI_DEF(SystemPowerInformation) { + *ReqSize = sizeof(PROCESSOR_POWER_INFORMATION) * KeNumberProcessors; + + if (sizeof(PROCESSOR_POWER_INFORMATION) * KeNumberProcessors > Size) + { + return STATUS_INFO_LENGTH_MISMATCH; + } + /* FIXME */ DPRINT1("NtQuerySystemInformation - SystemPowerInformation not implemented\n"); return STATUS_NOT_IMPLEMENTED;
Modified: trunk/reactos/ntoskrnl/ps/query.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/query.c?rev=680... ============================================================================== --- trunk/reactos/ntoskrnl/ps/query.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ps/query.c [iso-8859-1] Sat Jun 6 09:36:01 2015 @@ -960,6 +960,7 @@ Length = sizeof(ULONG_PTR); if (ProcessInformationLength != Length) { + Length = 0; Status = STATUS_INFO_LENGTH_MISMATCH; break; }