[1/2] msi: Fix use of uninitialized variables.

Hans Leidekker hans at codeweavers.com
Fri Nov 9 09:46:52 CST 2012


---
 dlls/msi/action.c     |    2 +-
 dlls/msi/automation.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index f9ab550..833bc67 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -2884,7 +2884,7 @@ static UINT ITERATE_WriteRegistryValues(MSIRECORD *row, LPVOID param)
         if (type == REG_MULTI_SZ)
         {
             BYTE *new;
-            if (old_type != REG_MULTI_SZ)
+            if (old_value && old_type != REG_MULTI_SZ)
             {
                 msi_free( old_value );
                 old_value = NULL;
diff --git a/dlls/msi/automation.c b/dlls/msi/automation.c
index e55717a..5df6b95 100644
--- a/dlls/msi/automation.c
+++ b/dlls/msi/automation.c
@@ -846,7 +846,7 @@ static HRESULT RecordImpl_Invoke(
         UINT* puArgErr)
 {
     WCHAR *szString;
-    DWORD dwLen;
+    DWORD dwLen = 0;
     UINT ret;
     VARIANTARG varg0, varg1;
     HRESULT hr;
-- 
1.7.10.4







More information about the wine-patches mailing list