Commit 639048b9 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

If MsiGetProperty(A/W) is called with a NULL for the value buffer but

a value in the size for the value buffer, then Msi fills in the size of the value into the pointer for size. This is tested and confirmed with native MSI.
parent f58eed36
...@@ -893,6 +893,10 @@ UINT WINAPI MsiGetPropertyA(MSIHANDLE hInstall, LPCSTR szName, LPSTR szValueBuf, ...@@ -893,6 +893,10 @@ UINT WINAPI MsiGetPropertyA(MSIHANDLE hInstall, LPCSTR szName, LPSTR szValueBuf,
if (NULL != szValueBuf && NULL == pchValueBuf) if (NULL != szValueBuf && NULL == pchValueBuf)
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
/* This was tested against native msi */
if (NULL == szValueBuf && NULL != pchValueBuf)
*pchValueBuf = 0;
package = msihandle2msiinfo( hInstall, MSIHANDLETYPE_PACKAGE); package = msihandle2msiinfo( hInstall, MSIHANDLETYPE_PACKAGE);
if (!package) if (!package)
return ERROR_INVALID_HANDLE; return ERROR_INVALID_HANDLE;
...@@ -920,6 +924,10 @@ UINT WINAPI MsiGetPropertyW(MSIHANDLE hInstall, LPCWSTR szName, ...@@ -920,6 +924,10 @@ UINT WINAPI MsiGetPropertyW(MSIHANDLE hInstall, LPCWSTR szName,
if (NULL != szValueBuf && NULL == pchValueBuf) if (NULL != szValueBuf && NULL == pchValueBuf)
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
/* This was tested against native msi */
if (NULL == szValueBuf && NULL != pchValueBuf)
*pchValueBuf = 0;
package = msihandle2msiinfo( hInstall, MSIHANDLETYPE_PACKAGE); package = msihandle2msiinfo( hInstall, MSIHANDLETYPE_PACKAGE);
if (!package) if (!package)
return ERROR_INVALID_HANDLE; return ERROR_INVALID_HANDLE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment