Hans Leidekker : msi: Avoid accessing uninitialized memory.

Alexandre Julliard julliard at winehq.org
Wed Oct 21 13:14:11 CDT 2009


Module: wine
Branch: master
Commit: a15e6cbb1afcc3a7094720572456caa6dbc80714
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a15e6cbb1afcc3a7094720572456caa6dbc80714

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Wed Oct 21 13:20:04 2009 +0200

msi: Avoid accessing uninitialized memory.

Found by valgrind.

---

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

diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index b9b8199..a6af7cc 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -5037,7 +5037,7 @@ static UINT ITERATE_WriteEnvironmentString( MSIRECORD *rec, LPVOID param )
             goto done;
         }
 
-        size =  (lstrlenW(value) + 1 + size) * sizeof(WCHAR);
+        size += (lstrlenW(value) + 1) * sizeof(WCHAR);
         newval =  msi_alloc(size);
         ptr = newval;
         if (!newval)




More information about the wine-cvs mailing list