From 8caef535e0a695b835a185d84a6f106088ac84df Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Fri, 28 Oct 2005 10:41:20 +0000 Subject: [PATCH] Return an error in MsiGetComponentPathW if passed a null component. --- dlls/msi/msi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c index af1728dd81d..a91e0551975 100644 --- a/dlls/msi/msi.c +++ b/dlls/msi/msi.c @@ -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;