https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7c8b6fdf828dc73375e07b7d22e835075e940adc
commit 7c8b6fdf828dc73375e07b7d22e835075e940adc Author: winesync <[email protected]> AuthorDate: Sat Mar 12 23:57:42 2022 +0100 Commit: Mark Jansen <[email protected]> CommitDate: Sun Mar 20 19:28:02 2022 +0100 [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 <[email protected]> Signed-off-by: Hans Leidekker <[email protected]> Signed-off-by: Alexandre Julliard <[email protected]> wine commit id b857369f87c49f812b23320099dcb91dbdb6f320 by Dmitry Timoshkov <[email protected]> --- dll/win32/msi/suminfo.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dll/win32/msi/suminfo.c b/dll/win32/msi/suminfo.c index ec676e46e00..6b3a559f60c 100644 --- a/dll/win32/msi/suminfo.c +++ b/dll/win32/msi/suminfo.c @@ -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 );
