Rich Ercolani : winefile: Fix NULL pointer deref in read_tree.

Alexandre Julliard julliard at winehq.org
Sat Jan 10 11:16:44 CST 2009


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

Author: Rich Ercolani <Rincebrain+wine at gmail.com>
Date:   Sat Jan 10 04:48:54 2009 -0500

winefile: Fix NULL pointer deref in read_tree.

---

 programs/winefile/winefile.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/programs/winefile/winefile.c b/programs/winefile/winefile.c
index b3e5471..2caff8e 100644
--- a/programs/winefile/winefile.c
+++ b/programs/winefile/winefile.c
@@ -3781,8 +3781,15 @@ static void refresh_child(ChildWnd* child)
 	scan_entry(child, &child->root.entry, 0, child->hwnd);
 
 #ifdef _SHELL_FOLDERS
+
 	if (child->root.entry.etype == ET_SHELL)
-		entry = read_tree(&child->root, NULL, get_path_pidl(path,child->hwnd), drv, child->sortOrder, child->hwnd);
+	{
+		LPITEMIDLIST local_pidl = get_path_pidl(path,child->hwnd);
+		if (local_pidl)
+			entry = read_tree(&child->root, NULL, local_pidl , drv, child->sortOrder, child->hwnd);
+		else
+			entry = NULL;
+	}
 	else
 #endif
 		entry = read_tree(&child->root, path, NULL, drv, child->sortOrder, child->hwnd);




More information about the wine-cvs mailing list