From f178985db3fc492acee7b589bc0f46b78bb74b9e Mon Sep 17 00:00:00 2001 From: James Hawkins Date: Sun, 24 Feb 2008 20:03:24 -0600 Subject: [PATCH] msi: Simplify the check for a valid product code. --- dlls/msi/source.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/dlls/msi/source.c b/dlls/msi/source.c index c373df25603..66a3af103ef 100644 --- a/dlls/msi/source.c +++ b/dlls/msi/source.c @@ -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) -- 2.11.4.GIT