[WINESYNC] msi: Do not attempt to copy a non-string property in MsiSummaryInfoGetProperty.

This patch fixes the crashes when running the tests under Wine.
Currently the crashes are hidden by a custom action exception handler.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id b857369f87c49f812b23320099dcb91dbdb6f320 by Dmitry Timoshkov <dmitry@baikal.ru>
This commit is contained in:
winesync 2022-03-12 23:57:42 +01:00 committed by Mark Jansen
parent e58cc02596
commit 7c8b6fdf82
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B

View file

@ -773,8 +773,10 @@ UINT WINAPI MsiSummaryInfoGetPropertyA(
}
__ENDTRY
if (!r)
if (!r && buf)
{
r = msi_strncpyWtoA( buf, -1, szValueBuf, pcchValueBuf, TRUE );
}
midl_user_free( buf );
return r;
@ -823,7 +825,7 @@ UINT WINAPI MsiSummaryInfoGetPropertyW(
}
__ENDTRY
if (!r)
if (!r && buf)
r = msi_strncpyW( buf, -1, szValueBuf, pcchValueBuf );
midl_user_free( buf );