mirror of
https://github.com/reactos/reactos.git
synced 2025-05-08 19:27:00 +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))
|
if ( hModule && !((ULONG_PTR)hModule >> 16))
|
||||||
{
|
{
|
||||||
pinth = RtlImageNtHeader( hModule );
|
pinth = RtlImageNtHeader( hModule );
|
||||||
|
if ( pinth )
|
||||||
dwMajorVersion = pinth->OptionalHeader.MajorSubsystemVersion;
|
|
||||||
|
|
||||||
if ( dwMajorVersion == 1 )
|
|
||||||
{
|
{
|
||||||
dwMajorVersion = 3;
|
dwMajorVersion = pinth->OptionalHeader.MajorSubsystemVersion;
|
||||||
}
|
|
||||||
else
|
if ( dwMajorVersion == 1 )
|
||||||
{
|
{
|
||||||
dwMinorVersion = pinth->OptionalHeader.MinorSubsystemVersion;
|
dwMajorVersion = 3;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dwMinorVersion = pinth->OptionalHeader.MinorSubsystemVersion;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return MAKELONG(MAKEWORD(dwMinorVersion, dwMajorVersion), 0);
|
return MAKELONG(MAKEWORD(dwMinorVersion, dwMajorVersion), 0);
|
||||||
|
|
Loading…
Reference in a new issue