comdlg32: fix a stack overflow
Damjan Jovanovic
damjan.jov at gmail.com
Fri Oct 8 00:21:23 CDT 2010
Changelog:
* fix a stack overflow
Fails to recurse if a PIDL's parent is itself, stopping a stack
overflow in the Notepad file dialog when the current directory is
outside Wine's drive mappings.
Closes #24556.
Damjan Jovanovic
-------------- next part --------------
diff --git a/dlls/comdlg32/filedlg.c b/dlls/comdlg32/filedlg.c
index a6f6023..01b068e 100644
--- a/dlls/comdlg32/filedlg.c
+++ b/dlls/comdlg32/filedlg.c
@@ -3349,6 +3349,9 @@ static int FILEDLG95_LOOKIN_InsertItemAfterParent(HWND hwnd,LPITEMIDLIST pidl)
TRACE("\n");
+ if (pidl == pidlParent)
+ return -1;
+
iParentPos = FILEDLG95_LOOKIN_SearchItem(hwnd,(WPARAM)pidlParent,SEARCH_PIDL);
if(iParentPos < 0)
More information about the wine-patches
mailing list