James Hawkins : msi: Fix the size of the data sent in to RegSetValueExW.

Alexandre Julliard julliard at winehq.org
Fri Feb 22 05:49:41 CST 2008


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

Author: James Hawkins <jhawkins at codeweavers.com>
Date:   Thu Feb 21 21:47:13 2008 -0600

msi: Fix the size of the data sent in to RegSetValueExW.

---

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

diff --git a/dlls/msi/source.c b/dlls/msi/source.c
index 44ab0c1..c373df2 100644
--- a/dlls/msi/source.c
+++ b/dlls/msi/source.c
@@ -563,6 +563,7 @@ static UINT set_last_used_source(HKEY source, LPCWSTR product, LPCWSTR usersid,
 
     sprintfW(buffer, format, typechar, index, value);
 
+    size = (lstrlenW(buffer) + 1) * sizeof(WCHAR);
     r = RegSetValueExW(source, INSTALLPROPERTY_LASTUSEDSOURCEW, 0,
                        REG_SZ, (LPBYTE)buffer, size);
     msi_free(buffer);




More information about the wine-cvs mailing list