[PATCH] msi: Prevent uninitialized variable usage
Mark Jansen
mark.jansen at reactos.org
Sun Feb 17 10:31:07 CST 2019
Observed with Lync 2010 setup in ReactOS.
The embedded Silverlight setup hits this case. (No LASTUSEDSOURCE in the
registry)
-------------- next part --------------
From c844026ee9ed164226e51ee3b9715bdd0441e0d9 Mon Sep 17 00:00:00 2001
From: Mark Jansen <mark.jansen at reactos.org>
Date: Sun, 17 Feb 2019 17:14:09 +0100
Subject: [PATCH] msi: Prevent uninitialized variable usage
Signed-off-by: Mark Jansen <mark.jansen at reactos.org>
---
dlls/msi/source.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/dlls/msi/source.c b/dlls/msi/source.c
index e2cf7fc8ad..3640b0dfbd 100644
--- a/dlls/msi/source.c
+++ b/dlls/msi/source.c
@@ -592,8 +592,11 @@ UINT WINAPI MsiSourceListGetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid,
0, 0, NULL, &size);
if (rc != ERROR_SUCCESS)
{
- RegCloseKey(sourcekey);
- return ERROR_SUCCESS;
+ static WCHAR szEmpty[1] = { '\0' };
+ rc = ERROR_SUCCESS;
+ source = NULL;
+ ptr = szEmpty;
+ goto output_out;
}
source = msi_alloc(size);
@@ -627,7 +630,7 @@ UINT WINAPI MsiSourceListGetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid,
else
ptr++;
}
-
+output_out:
if (szValue)
{
if (strlenW(ptr) < *pcchValue)
--
2.18.0.windows.1
More information about the wine-devel
mailing list