Commit 90bc168c authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

Correct a crash if the length buffer is NULL.

parent fbc7a402
...@@ -971,11 +971,16 @@ INSTALLSTATE WINAPI MsiGetComponentPathA(LPCSTR szProduct, LPCSTR szComponent, ...@@ -971,11 +971,16 @@ INSTALLSTATE WINAPI MsiGetComponentPathA(LPCSTR szProduct, LPCSTR szComponent,
} }
if( pcchBuf && *pcchBuf > 0 ) if( pcchBuf && *pcchBuf > 0 )
{
lpwPathBuf = HeapAlloc( GetProcessHeap(), 0, *pcchBuf * sizeof(WCHAR)); lpwPathBuf = HeapAlloc( GetProcessHeap(), 0, *pcchBuf * sizeof(WCHAR));
incoming_len = *pcchBuf;
}
else else
{
lpwPathBuf = NULL; lpwPathBuf = NULL;
incoming_len = 0;
}
incoming_len = *pcchBuf;
rc = MsiGetComponentPathW(szwProduct, szwComponent, lpwPathBuf, pcchBuf); rc = MsiGetComponentPathW(szwProduct, szwComponent, lpwPathBuf, pcchBuf);
HeapFree( GetProcessHeap(), 0, szwProduct); HeapFree( GetProcessHeap(), 0, szwProduct);
......
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