Return an error in MsiGetComponentPathW if passed a null component.

This commit is contained in:
Mike McCormack 2005-10-28 10:41:20 +00:00 committed by Alexandre Julliard
parent 029c83d88e
commit 8caef535e0
1 changed files with 3 additions and 1 deletions

View File

@ -418,7 +418,7 @@ UINT WINAPI MsiGetProductCodeW(LPCWSTR szComponent, LPWSTR szBuffer)
DWORD sz = GUID_SIZE;
static const WCHAR szPermKey[] =
{ '0','0','0','0','0','0','0','0','0','0','0','0',
'0','0','0','0','0','0','0', '0','0','0','0','0',
'0','0','0','0','0','0','0','0','0','0','0','0',
'0','0','0','0','0','0','0','0',0};
TRACE("%s %p\n",debugstr_w(szComponent), szBuffer);
@ -1011,6 +1011,8 @@ INSTALLSTATE WINAPI MsiGetComponentPathW(LPCWSTR szProduct, LPCWSTR szComponent,
TRACE("%s %s %p %p\n", debugstr_w(szProduct),
debugstr_w(szComponent), lpPathBuf, pcchBuf);
if( !szComponent )
return INSTALLSTATE_INVALIDARG;
if( lpPathBuf && !pcchBuf )
return INSTALLSTATE_INVALIDARG;