pervent crashes in SHAddToRecentDocs

Aric Stewart aric at codeweavers.com
Mon Sep 27 19:45:55 CDT 2004


If our given PIDL does not reveal a path then print error and exit 
instead of blindly charging ahead

fixes crashes in Project 2000
-------------- next part --------------
Index: dlls/shell32/shellord.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shellord.c,v
retrieving revision 1.127
diff -u -r1.127 shellord.c
--- dlls/shell32/shellord.c	7 Sep 2004 22:46:27 -0000	1.127
+++ dlls/shell32/shellord.c	28 Sep 2004 00:37:43 -0000
@@ -755,7 +755,11 @@
     /* Get the pure document name from the input
      */
     if (uFlags & SHARD_PIDL) {
-	SHGetPathFromIDListA((LPCITEMIDLIST) pv, doc_name);
+        if (!SHGetPathFromIDListA((LPCITEMIDLIST) pv, doc_name))
+        {
+            ERR("Unable to get pure document name from pidl\n");
+            return;
+        }
     }
     else {
 	lstrcpyA(doc_name, (LPSTR) pv);


More information about the wine-patches mailing list