mirror of
https://github.com/reactos/wine.git
synced 2025-02-15 10:29:19 +00:00
Correct a crash if the length buffer is NULL.
This commit is contained in:
parent
fbc7a40273
commit
90bc168c87
@ -971,11 +971,16 @@ INSTALLSTATE WINAPI MsiGetComponentPathA(LPCSTR szProduct, LPCSTR szComponent,
|
||||
}
|
||||
|
||||
if( pcchBuf && *pcchBuf > 0 )
|
||||
{
|
||||
lpwPathBuf = HeapAlloc( GetProcessHeap(), 0, *pcchBuf * sizeof(WCHAR));
|
||||
incoming_len = *pcchBuf;
|
||||
}
|
||||
else
|
||||
{
|
||||
lpwPathBuf = NULL;
|
||||
incoming_len = 0;
|
||||
}
|
||||
|
||||
incoming_len = *pcchBuf;
|
||||
rc = MsiGetComponentPathW(szwProduct, szwComponent, lpwPathBuf, pcchBuf);
|
||||
|
||||
HeapFree( GetProcessHeap(), 0, szwProduct);
|
||||
|
Loading…
x
Reference in New Issue
Block a user