patch from w3seek : Another fix for NtUserFindWindowEx

svn path=/trunk/; revision=21957
This commit is contained in:
Magnus Olsen 2006-05-21 06:17:25 +00:00
parent 3e649bb0dc
commit 7ece217a3e

View file

@ -2444,13 +2444,16 @@ NtUserFindWindowEx(HWND hwndParent,
ClassName.Length,
sizeof(WCHAR));
}
else if (IS_ATOM(ClassName.Buffer))
else if (ClassName.Buffer != NULL && !IS_ATOM(ClassName.Buffer))
{
if (!IntGetAtomFromStringOrAtom(&ClassName,
&ClassAtom))
{
_SEH_LEAVE;
}
SetLastWin32Error(ERROR_INVALID_PARAMETER);
_SEH_LEAVE;
}
if (!IntGetAtomFromStringOrAtom(&ClassName,
&ClassAtom))
{
_SEH_LEAVE;
}
}
@ -2472,9 +2475,10 @@ NtUserFindWindowEx(HWND hwndParent,
}
_SEH_END;
if (ucClassName != NULL && ClassName.Length == 0)
if (ucClassName != NULL)
{
if (!IS_ATOM(ClassName.Buffer))
if (ClassName.Length == 0 && ClassName.Buffer != NULL &&
!IS_ATOM(ClassName.Buffer))
{
SetLastWin32Error(ERROR_INVALID_PARAMETER);
RETURN(NULL);