Alex Villacís Lasso : user32: Fix crash while dir-navigating in Win3.1-style file open dialog.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Aug 20 16:08:47 CDT 2007


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

Author: Alex Villacís Lasso <a_villacis at palosanto.com>
Date:   Sun Aug 19 17:41:21 2007 -0500

user32: Fix crash while dir-navigating in Win3.1-style file open dialog.

---

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

diff --git a/dlls/user32/dialog.c b/dlls/user32/dialog.c
index fbcb5f1..b43acf0 100644
--- a/dlls/user32/dialog.c
+++ b/dlls/user32/dialog.c
@@ -1677,7 +1677,7 @@ static BOOL DIALOG_DlgDirSelect( HWND hwnd, LPWSTR str, INT len,
     item = SendMessageW(listbox, combo ? CB_GETCURSEL : LB_GETCURSEL, 0, 0 );
     if (item == LB_ERR) return FALSE;
 
-    size = SendMessageW(listbox, combo ? CB_GETLBTEXTLEN : LB_GETTEXTLEN, 0, 0 );
+    size = SendMessageW(listbox, combo ? CB_GETLBTEXTLEN : LB_GETTEXTLEN, item, 0 );
     if (size == LB_ERR) return FALSE;
 
     if (!(buffer = HeapAlloc( GetProcessHeap(), 0, (size+1) * sizeof(WCHAR) ))) return FALSE;




More information about the wine-cvs mailing list