[MSI] Prevent uninitialized variable usage

This commit is contained in:
Mark Jansen 2019-02-17 20:46:47 +01:00
parent 2fade6ede4
commit 860f96f431
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B

View file

@ -592,8 +592,11 @@ UINT WINAPI MsiSourceListGetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid,
0, 0, NULL, &size);
if (rc != ERROR_SUCCESS)
{
RegCloseKey(sourcekey);
return ERROR_SUCCESS;
static WCHAR szEmpty[1] = { '\0' };
rc = ERROR_SUCCESS;
source = NULL;
ptr = szEmpty;
goto output_out;
}
source = msi_alloc(size);
@ -627,7 +630,7 @@ UINT WINAPI MsiSourceListGetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid,
else
ptr++;
}
output_out:
if (szValue)
{
if (strlenW(ptr) < *pcchValue)