mirror of
https://github.com/reactos/reactos.git
synced 2025-05-07 10:46:58 +00:00
[User32] Fix null return.
See CORE-16769.
This commit is contained in:
parent
7481bda679
commit
d8add40e89
1 changed files with 11 additions and 9 deletions
|
@ -159,16 +159,18 @@ RtlGetExpWinVer( HMODULE hModule )
|
|||
if ( hModule && !((ULONG_PTR)hModule >> 16))
|
||||
{
|
||||
pinth = RtlImageNtHeader( hModule );
|
||||
|
||||
dwMajorVersion = pinth->OptionalHeader.MajorSubsystemVersion;
|
||||
|
||||
if ( dwMajorVersion == 1 )
|
||||
if ( pinth )
|
||||
{
|
||||
dwMajorVersion = 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
dwMinorVersion = pinth->OptionalHeader.MinorSubsystemVersion;
|
||||
dwMajorVersion = pinth->OptionalHeader.MajorSubsystemVersion;
|
||||
|
||||
if ( dwMajorVersion == 1 )
|
||||
{
|
||||
dwMajorVersion = 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
dwMinorVersion = pinth->OptionalHeader.MinorSubsystemVersion;
|
||||
}
|
||||
}
|
||||
}
|
||||
return MAKELONG(MAKEWORD(dwMinorVersion, dwMajorVersion), 0);
|
||||
|
|
Loading…
Reference in a new issue