James Hawkins : shell32: Add missing multiply by sizeof(WCHAR)l

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jun 26 07:11:25 CDT 2006


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

Author: James Hawkins <truiken at gmail.com>
Date:   Fri Jun 23 05:24:40 2006 -0700

shell32: Add missing multiply by sizeof(WCHAR)l

---

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

diff --git a/dlls/shell32/brsfolder.c b/dlls/shell32/brsfolder.c
index 88516a2..2ef6b76 100644
--- a/dlls/shell32/brsfolder.c
+++ b/dlls/shell32/brsfolder.c
@@ -636,7 +636,7 @@ static BOOL BrsFolder_OnSetSelectionA(br
         return BrsFolder_OnSetSelectionW(info, selection, is_str);
     
     if ((length = MultiByteToWideChar(CP_ACP, 0, (LPCSTR)selection, -1, NULL, 0)) &&
-        (selectionW = HeapAlloc(GetProcessHeap(), 0, length)) &&
+        (selectionW = HeapAlloc(GetProcessHeap(), 0, length * sizeof(WCHAR))) &&
         MultiByteToWideChar(CP_ACP, 0, (LPCSTR)selection, -1, selectionW, length))
     {
         result = BrsFolder_OnSetSelectionW(info, selectionW, is_str);




More information about the wine-cvs mailing list