From a6a88b1b873d7da1fd81dcfea1a1581294f53fcb Mon Sep 17 00:00:00 2001 From: Valentin Radu Date: Sat, 12 Nov 2022 23:54:21 +0200 Subject: [PATCH] Taskbar11: Fixed a bug that could crash `explorer.exe` when right clicking certain system tray icons on 22621-based builds Impact: Failure to check against a NULL value and dereferencing it leads to a crash in `explorer.exe` with fault offset 0xfc69 on 22621-based OS builds. This happens when right clicking certain system tray icons, like "Epic Games Launcher" when using the Windows 11 taskbar. Description: The issue has been addressed with improved checks: a check against NULL values is performed before attempting to work with the data the variables might point to. --- ExplorerPatcher/dllmain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ExplorerPatcher/dllmain.c b/ExplorerPatcher/dllmain.c index b32a549..7580d88 100644 --- a/ExplorerPatcher/dllmain.c +++ b/ExplorerPatcher/dllmain.c @@ -2235,7 +2235,7 @@ BOOL IsPointOnEmptyAreaOfNewTaskbar(POINT pt) } if (SUCCEEDED(hr) && bIsWindows11Version22H2OrHigher) { - bRet = (!wcscmp(elemName, L"") && !wcscmp(elemType, L"Taskbar.TaskbarFrameAutomationPeer")); + bRet = elemName && elemType && (!wcscmp(elemName, L"") && !wcscmp(elemType, L"Taskbar.TaskbarFrameAutomationPeer")); } if (SUCCEEDED(hr) && !bIsWindows11Version22H2OrHigher) {