Rob Shearman : mshtml: Fix the buffer length being passed into MultiByteToWideChar in set_registry .

Alexandre Julliard julliard at winehq.org
Fri Apr 11 06:27:56 CDT 2008


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

Author: Rob Shearman <rob at codeweavers.com>
Date:   Thu Apr 10 12:01:52 2008 +0100

mshtml: Fix the buffer length being passed into MultiByteToWideChar in set_registry.

---

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

diff --git a/dlls/mshtml/install.c b/dlls/mshtml/install.c
index edb5f58..b991c49 100644
--- a/dlls/mshtml/install.c
+++ b/dlls/mshtml/install.c
@@ -113,7 +113,7 @@ static void set_registry(LPCSTR install_dir)
 
     len = MultiByteToWideChar(CP_ACP, 0, install_dir, -1, NULL, 0)-1;
     gecko_path = heap_alloc((len+1)*sizeof(WCHAR)+sizeof(wszWineGecko));
-    MultiByteToWideChar(CP_ACP, 0, install_dir, -1, gecko_path, (len+1)*sizeof(WCHAR));
+    MultiByteToWideChar(CP_ACP, 0, install_dir, -1, gecko_path, len+1);
 
     if (len && gecko_path[len-1] != '\\')
         gecko_path[len++] = '\\';




More information about the wine-cvs mailing list