Added patch to prevent a possible nullptr dereference in SHGetFileInfoW.

This commit is contained in:
Sebastian Lackner 2017-07-17 15:10:03 +02:00
parent 020888539d
commit c99cdb85d7
3 changed files with 43 additions and 0 deletions

View File

@ -363,6 +363,7 @@ patch_enable_all ()
enable_shell32_SHELL_execute="$1"
enable_shell32_SHFileOperation_Move="$1"
enable_shell32_SHFileOperation_Win9x="$1"
enable_shell32_SHGetFileInfoW="$1"
enable_shell32_Toolbar_Bitmaps="$1"
enable_shell32_UnixFS="$1"
enable_shlwapi_AssocGetPerceivedType="$1"
@ -1344,6 +1345,9 @@ patch_enable ()
shell32-SHFileOperation_Win9x)
enable_shell32_SHFileOperation_Win9x="$2"
;;
shell32-SHGetFileInfoW)
enable_shell32_SHGetFileInfoW="$2"
;;
shell32-Toolbar_Bitmaps)
enable_shell32_Toolbar_Bitmaps="$2"
;;
@ -7853,6 +7857,18 @@ if test "$enable_shell32_SHFileOperation_Win9x" -eq 1; then
) >> "$patchlist"
fi
# Patchset shell32-SHGetFileInfoW
# |
# | Modified files:
# | * dlls/shell32/shell32_main.c
# |
if test "$enable_shell32_SHGetFileInfoW" -eq 1; then
patch_apply shell32-SHGetFileInfoW/0001-shell32-Prevent-a-possible-nullptr-dereference-in-SH.patch
(
printf '%s\n' '+ { "Mark Jansen", "shell32: Prevent a possible nullptr dereference in SHGetFileInfoW.", 1 },';
) >> "$patchlist"
fi
# Patchset shell32-Toolbar_Bitmaps
# |
# | This patchset fixes the following Wine bugs:

View File

@ -0,0 +1,26 @@
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

View File

@ -0,0 +1 @@
Fixes: Prevent a possible nullptr dereference in SHGetFileInfoW