Commit aea12b46 authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

msi: Fix conversion of path to include nul-termination character in MsiProvideQualifiedComponentA.

parent d2cb9ec5
......@@ -1617,7 +1617,7 @@ UINT WINAPI MsiProvideQualifiedComponentA( LPCSTR szComponent,
DWORD* pcchPathBuf)
{
LPWSTR szwComponent, szwQualifier, lpwPathBuf;
DWORD pcchwPathBuf;
DWORD cchwPathBuf;
UINT rc;
TRACE("%s %s %li %p %p\n",szComponent, szQualifier,
......@@ -1628,16 +1628,16 @@ UINT WINAPI MsiProvideQualifiedComponentA( LPCSTR szComponent,
lpwPathBuf = msi_alloc(*pcchPathBuf * sizeof(WCHAR));
pcchwPathBuf = *pcchPathBuf;
cchwPathBuf = *pcchPathBuf;
rc = MsiProvideQualifiedComponentW(szwComponent, szwQualifier,
dwInstallMode, lpwPathBuf, &pcchwPathBuf);
dwInstallMode, lpwPathBuf, &cchwPathBuf);
msi_free(szwComponent);
msi_free(szwQualifier);
if (rc == ERROR_SUCCESS)
*pcchPathBuf = WideCharToMultiByte(CP_ACP, 0, lpwPathBuf, pcchwPathBuf,
*pcchPathBuf = WideCharToMultiByte(CP_ACP, 0, lpwPathBuf, cchwPathBuf + 1,
lpPathBuf, *pcchPathBuf, NULL, NULL);
msi_free(lpwPathBuf);
......
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