From 82596b9c3f080d8b014dfab636c9462261dd3936 Mon Sep 17 00:00:00 2001 From: Arjun Balgovind <32061677+arjunbalgovind@users.noreply.github.com> Date: Mon, 23 Mar 2020 12:14:03 -0700 Subject: [PATCH] MSIX: Fix for Heap Corruption bug in ImageResizer (#1655) --- src/modules/imageresizer/dll/ContextMenuHandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/imageresizer/dll/ContextMenuHandler.cpp b/src/modules/imageresizer/dll/ContextMenuHandler.cpp index da77e123f9..556a0b1891 100644 --- a/src/modules/imageresizer/dll/ContextMenuHandler.cpp +++ b/src/modules/imageresizer/dll/ContextMenuHandler.cpp @@ -376,7 +376,7 @@ HRESULT __stdcall CContextMenuHandler::GetState(IShellItemArray* psiItemArray, B // TODO: Instead, detect whether there's a WIC codec installed that can handle this file AssocGetPerceivedType(pszExt, &type, &flag, NULL); - free(pszPath); + CoTaskMemFree(pszPath); // If selected file is an image... if (type == PERCEIVED_TYPE_IMAGE) {