Skip to content
Snippets Groups Projects
Commit 594af0de authored by Morten Eriksen's avatar Morten Eriksen Committed by Alexandre Julliard
Browse files

Made GetVersionEx() behave in accordance with the specification with

regard to error handling.
parent 6f617600
No related branches found
No related tags found
No related merge requests found
......@@ -17,6 +17,7 @@
#include "debugtools.h"
#include "neexe.h"
#include "winversion.h"
#include "winerror.h"
DEFAULT_DEBUG_CHANNEL(ver)
......@@ -331,6 +332,7 @@ BOOL16 WINAPI GetVersionEx16(OSVERSIONINFO16 *v)
if (v->dwOSVersionInfoSize != sizeof(OSVERSIONINFO16))
{
WARN("wrong OSVERSIONINFO size from app");
SetLastError(ERROR_INSUFFICIENT_BUFFER);
return FALSE;
}
v->dwMajorVersion = VersionData[ver].getVersionEx.dwMajorVersion;
......@@ -351,6 +353,7 @@ BOOL WINAPI GetVersionExA(OSVERSIONINFOA *v)
if (v->dwOSVersionInfoSize != sizeof(OSVERSIONINFOA))
{
WARN("wrong OSVERSIONINFO size from app");
SetLastError(ERROR_INSUFFICIENT_BUFFER);
return FALSE;
}
v->dwMajorVersion = VersionData[ver].getVersionEx.dwMajorVersion;
......@@ -372,6 +375,7 @@ BOOL WINAPI GetVersionExW(OSVERSIONINFOW *v)
if (v->dwOSVersionInfoSize!=sizeof(OSVERSIONINFOW))
{
WARN("wrong OSVERSIONINFO size from app");
SetLastError(ERROR_INSUFFICIENT_BUFFER);
return FALSE;
}
v->dwMajorVersion = VersionData[ver].getVersionEx.dwMajorVersion;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment