[PATCH] comdlg32: Avoid infinite recursion in FILEDLG95_LOOKIN_InsertItemAfterParent.
Lei Zhang
thestig at google.com
Wed Dec 3 19:15:59 CST 2008
Hi,
If FILEDLG95_LOOKIN_InsertItemAfterParent() receives pidl = NULL, then
it will recurse infinitely.
-------------- next part --------------
From 98040c0814a92d18c2102d82f5342e1a8a957f68 Mon Sep 17 00:00:00 2001
From: Lei Zhang <thestig at google.com>
Date: Wed, 3 Dec 2008 17:04:08 -0800
Subject: [PATCH] comdlg32: Avoid infinite recursion in FILEDLG95_LOOKIN_InsertItemAfterParent.
---
dlls/comdlg32/filedlg.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/dlls/comdlg32/filedlg.c b/dlls/comdlg32/filedlg.c
index e1eedd1..a80a101 100644
--- a/dlls/comdlg32/filedlg.c
+++ b/dlls/comdlg32/filedlg.c
@@ -2894,6 +2894,9 @@ static int FILEDLG95_LOOKIN_InsertItemAfterParent(HWND hwnd,LPITEMIDLIST pidl)
TRACE("\n");
+ if (!pidl)
+ return -1;
+
iParentPos = FILEDLG95_LOOKIN_SearchItem(hwnd,(WPARAM)pidlParent,SEARCH_PIDL);
if(iParentPos < 0)
--
1.5.4.5
More information about the wine-patches
mailing list