- Fixed get menu info, check parameters first than the handle. See CORE-8064.

svn path=/trunk/; revision=62747
This commit is contained in:
James Tabor 2014-04-14 06:05:34 +00:00
parent b07e61e478
commit 52fbc79cd6

View file

@ -4269,15 +4269,15 @@ GetMenuInfo(HMENU hmenu,
BOOL res = FALSE;
PVOID pMenu;
if (!(pMenu = ValidateHandle(hmenu, TYPE_MENU)))
return FALSE;
if (!lpcmi || (lpcmi->cbSize != sizeof(MENUINFO)))
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
if (!(pMenu = ValidateHandle(hmenu, TYPE_MENU)))
return FALSE;
RtlZeroMemory(&mi, sizeof(MENUINFO));
mi.cbSize = sizeof(MENUINFO);
mi.fMask = lpcmi->fMask;