wine-staging/patches/shell32-SHGetFileInfoW/0001-shell32-Prevent-a-possible-nullptr-dereference-in-SH.patch

27 lines
966 B
Diff

From a7db8be54b079a52c392d6f1e7be86792b60900a Mon Sep 17 00:00:00 2001
From: Mark Jansen <mark.jansen@reactos.org>
Date: Sun, 16 Jul 2017 16:27:12 +0200
Subject: shell32: Prevent a possible nullptr dereference in SHGetFileInfoW.
Signed-off-by: Mark Jansen <mark.jansen@reactos.org>
---
dlls/shell32/shell32_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/shell32/shell32_main.c b/dlls/shell32/shell32_main.c
index 34b906c2fd5..0ed67907ca1 100644
--- a/dlls/shell32/shell32_main.c
+++ b/dlls/shell32/shell32_main.c
@@ -431,7 +431,7 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes,
TRACE("%s fattr=0x%x sfi=%p(attr=0x%08x) size=0x%x flags=0x%x\n",
(flags & SHGFI_PIDL)? "pidl" : debugstr_w(path), dwFileAttributes,
- psfi, psfi->dwAttributes, sizeofpsfi, flags);
+ psfi, psfi ? psfi->dwAttributes : 0, sizeofpsfi, flags);
if (!path)
return FALSE;
--
2.13.1