James Hawkins : msi: Only copy the resulting string if the RegistryValue call succeeded.
Module: wine Branch: master Commit: 1fed032a43a23df80de7da6f7dbf23b4ed2a020f URL: http://source.winehq.org/git/wine.git/?a=commit;h=1fed032a43a23df80de7da6f7d... Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Tue Jul 8 23:56:26 2008 -0500 msi: Only copy the resulting string if the RegistryValue call succeeded. --- dlls/msi/tests/automation.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/msi/tests/automation.c b/dlls/msi/tests/automation.c index 03154e1..2c741e8 100644 --- a/dlls/msi/tests/automation.c +++ b/dlls/msi/tests/automation.c @@ -804,7 +804,7 @@ static HRESULT Installer_RegistryValueI(HKEY hkey, LPCWSTR szKey, int iValue, LP V_I4(&vararg) = iValue; hr = Installer_RegistryValue(hkey, szKey, vararg, &varresult, vtResult); - if (vtResult == VT_BSTR) lstrcpyW(szString, V_BSTR(&varresult)); + if (SUCCEEDED(hr) && vtResult == VT_BSTR) lstrcpyW(szString, V_BSTR(&varresult)); VariantClear(&varresult); return hr; }
participants (1)
-
Alexandre Julliard