Commit 94cd060d authored by James Juran's avatar James Juran Committed by Alexandre Julliard

Only fail with ERROR_INSUFFICIENT_BUFFER if the structure size is

actually too small.
parent 3724de93
......@@ -396,7 +396,7 @@ LONG WINAPI GetVersion(void)
BOOL16 WINAPI GetVersionEx16(OSVERSIONINFO16 *v)
{
WINDOWS_VERSION ver = VERSION_GetVersion();
if (v->dwOSVersionInfoSize != sizeof(OSVERSIONINFO16))
if (v->dwOSVersionInfoSize < sizeof(OSVERSIONINFO16))
{
WARN("wrong OSVERSIONINFO size from app\n");
SetLastError(ERROR_INSUFFICIENT_BUFFER);
......@@ -417,7 +417,7 @@ BOOL16 WINAPI GetVersionEx16(OSVERSIONINFO16 *v)
BOOL WINAPI GetVersionExA(OSVERSIONINFOA *v)
{
WINDOWS_VERSION ver = VERSION_GetVersion();
if (v->dwOSVersionInfoSize != sizeof(OSVERSIONINFOA))
if (v->dwOSVersionInfoSize < sizeof(OSVERSIONINFOA))
{
WARN("wrong OSVERSIONINFO size from app (got: %ld, expected: %d)\n",
v->dwOSVersionInfoSize, sizeof(OSVERSIONINFOA));
......@@ -440,7 +440,7 @@ BOOL WINAPI GetVersionExW(OSVERSIONINFOW *v)
{
WINDOWS_VERSION ver = VERSION_GetVersion();
if (v->dwOSVersionInfoSize!=sizeof(OSVERSIONINFOW))
if (v->dwOSVersionInfoSize < sizeof(OSVERSIONINFOW))
{
WARN("wrong OSVERSIONINFO size from app (got: %ld, expected: %d)\n",
v->dwOSVersionInfoSize, sizeof(OSVERSIONINFOW));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment