ntdll: Don't check "info" for NULL in NtQuerySystemInformation(SystemModuleInformation).
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
93107c08f5
commit
6257da8b42
|
@ -2333,30 +2333,27 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
|
||||||
"\\SystemRoot\\system32\\drivers\\mountmgr.sys"
|
"\\SystemRoot\\system32\\drivers\\mountmgr.sys"
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!info) ret = STATUS_ACCESS_VIOLATION;
|
ULONG i;
|
||||||
else
|
SYSTEM_MODULE_INFORMATION *smi = info;
|
||||||
{
|
|
||||||
ULONG i;
|
|
||||||
SYSTEM_MODULE_INFORMATION *smi = info;
|
|
||||||
|
|
||||||
len = offsetof( SYSTEM_MODULE_INFORMATION, Modules[ARRAY_SIZE(fake_modules)] );
|
len = offsetof( SYSTEM_MODULE_INFORMATION, Modules[ARRAY_SIZE(fake_modules)] );
|
||||||
if (len <= size)
|
if (len <= size)
|
||||||
|
{
|
||||||
|
memset( smi, 0, len );
|
||||||
|
for (i = 0; i < ARRAY_SIZE(fake_modules); i++)
|
||||||
{
|
{
|
||||||
memset( smi, 0, len );
|
SYSTEM_MODULE *sm = &smi->Modules[i];
|
||||||
for (i = 0; i < ARRAY_SIZE(fake_modules); i++)
|
sm->ImageBaseAddress = (char *)0x10000000 + 0x200000 * i;
|
||||||
{
|
sm->ImageSize = 0x200000;
|
||||||
SYSTEM_MODULE *sm = &smi->Modules[i];
|
sm->LoadOrderIndex = i;
|
||||||
sm->ImageBaseAddress = (char *)0x10000000 + 0x200000 * i;
|
sm->LoadCount = 1;
|
||||||
sm->ImageSize = 0x200000;
|
strcpy( (char *)sm->Name, fake_modules[i] );
|
||||||
sm->LoadOrderIndex = i;
|
sm->NameOffset = strrchr( fake_modules[i], '\\' ) - fake_modules[i] + 1;
|
||||||
sm->LoadCount = 1;
|
|
||||||
strcpy( (char *)sm->Name, fake_modules[i] );
|
|
||||||
sm->NameOffset = strrchr( fake_modules[i], '\\' ) - fake_modules[i] + 1;
|
|
||||||
}
|
|
||||||
smi->ModulesCount = i;
|
|
||||||
}
|
}
|
||||||
else ret = STATUS_INFO_LENGTH_MISMATCH;
|
smi->ModulesCount = i;
|
||||||
}
|
}
|
||||||
|
else ret = STATUS_INFO_LENGTH_MISMATCH;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue