Dmitry Timoshkov : msi: Do not attempt to copy a non-string property in MsiSummaryInfoGetProperty.
Module: wine Branch: master Commit: b857369f87c49f812b23320099dcb91dbdb6f320 URL: https://source.winehq.org/git/wine.git/?a=commit;h=b857369f87c49f812b2332009... Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Wed Sep 19 13:27:57 2018 +0800 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(a)baikal.ru> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msi/suminfo.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/msi/suminfo.c b/dlls/msi/suminfo.c index af3458a..98f6330 100644 --- a/dlls/msi/suminfo.c +++ b/dlls/msi/suminfo.c @@ -758,8 +758,10 @@ UINT WINAPI MsiSummaryInfoGetPropertyA( } __ENDTRY - if (!r) + if (!r && buf) + { r = msi_strncpyWtoA( buf, -1, szValueBuf, pcchValueBuf, TRUE ); + } midl_user_free( buf ); return r; @@ -808,7 +810,7 @@ UINT WINAPI MsiSummaryInfoGetPropertyW( } __ENDTRY - if (!r) + if (!r && buf) r = msi_strncpyW( buf, -1, szValueBuf, pcchValueBuf ); midl_user_free( buf );
participants (1)
-
Alexandre Julliard