>From a5da623dee737ceede8fad6545f803de0e4581c1 Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <nsivov@codeweavers.com>
Date: Mon, 21 Nov 2011 10:58:58 +0300
Subject: [PATCH 5/5] Avoid null pointer dereference in traces

---
 dlls/shell32/shellpath.c |   32 +++++++++++---------------------
 1 files changed, 11 insertions(+), 21 deletions(-)

diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c
index 25ba4be..9612687 100644
--- a/dlls/shell32/shellpath.c
+++ b/dlls/shell32/shellpath.c
@@ -669,37 +669,27 @@ BOOL WINAPI PathQualifyAW(LPCVOID pszPath)
 	return PathQualifyA(pszPath);
 }
 
-static BOOL PathResolveA(
-	LPSTR lpszPath,
-	LPCSTR *alpszPaths,
-	DWORD dwFlags)
+static BOOL PathResolveA(LPSTR path, LPCSTR *paths, DWORD flags)
 {
-	FIXME("(%s,%p,0x%08x),stub!\n",
-	  lpszPath, *alpszPaths, dwFlags);
-	return 0;
+    FIXME("(%s,%p,0x%08x),stub!\n", debugstr_a(path), paths, flags);
+    return FALSE;
 }
 
-static BOOL PathResolveW(
-	LPWSTR lpszPath,
-	LPCWSTR *alpszPaths,
-	DWORD dwFlags)
+static BOOL PathResolveW(LPWSTR path, LPCWSTR *paths, DWORD flags)
 {
-	FIXME("(%s,%p,0x%08x),stub!\n",
-	  debugstr_w(lpszPath), debugstr_w(*alpszPaths), dwFlags);
-	return 0;
+    FIXME("(%s,%p,0x%08x),stub!\n", debugstr_w(path), paths, flags);
+    return FALSE;
 }
 
 /*************************************************************************
  * PathResolve [SHELL32.51]
  */
-BOOL WINAPI PathResolveAW(
-	LPVOID lpszPath,
-	LPCVOID *alpszPaths,
-	DWORD dwFlags)
+BOOL WINAPI PathResolveAW(LPVOID path, LPCVOID *paths, DWORD flags)
 {
-	if (SHELL_OsIsUnicode())
-	  return PathResolveW(lpszPath, (LPCWSTR*)alpszPaths, dwFlags);
-	return PathResolveA(lpszPath, (LPCSTR*)alpszPaths, dwFlags);
+    if (SHELL_OsIsUnicode())
+        return PathResolveW(path, (LPCWSTR*)paths, flags);
+    else
+        return PathResolveA(path, (LPCSTR*)paths, flags);
 }
 
 /*************************************************************************
-- 
1.5.6.5

