msi: Simplify the check for a valid product code.

This commit is contained in:
James Hawkins 2008-02-24 20:03:24 -06:00 committed by Alexandre Julliard
parent 868de4d56b
commit f178985db3
1 changed files with 2 additions and 5 deletions

View File

@ -351,16 +351,13 @@ UINT WINAPI MsiSourceListGetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid,
LPCWSTR szProperty, LPWSTR szValue,
LPDWORD pcchValue)
{
WCHAR squished_pc[GUID_SIZE];
HKEY sourcekey;
UINT rc;
TRACE("%s %s\n", debugstr_w(szProduct), debugstr_w(szProperty));
if (!szProduct || !*szProduct)
return ERROR_INVALID_PARAMETER;
if (lstrlenW(szProduct) != GUID_SIZE - 1 ||
(szProduct[0] != '{' && szProduct[GUID_SIZE - 2] != '}'))
if (!szProduct || !squash_guid(szProduct, squished_pc))
return ERROR_INVALID_PARAMETER;
if (szValue && !pcchValue)