From d7d14e91f7525010c375c3302b75b4b22579849d Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Wed, 3 Jul 2024 12:22:10 +0500 Subject: [PATCH] SHGFI_EXETYPE doesn't need SHFILEINFOW Change-Id: Ib18d5a3992174c0b56f11970d02515bc6d0ea615 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169907 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- shell/source/win32/SysShExec.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shell/source/win32/SysShExec.cxx b/shell/source/win32/SysShExec.cxx index 3d8d7b994474..e4e10744b2a4 100644 --- a/shell/source/win32/SysShExec.cxx +++ b/shell/source/win32/SysShExec.cxx @@ -266,12 +266,12 @@ void SAL_CALL CSysShExec::execute( const OUString& aCommand, const OUString& aPa + ") failed", {}, 0); } - SHFILEINFOW info; - if (SHGetFileInfoW(path, 0, &info, sizeof info, SHGFI_EXETYPE) != 0) + if (SHGetFileInfoW(path, 0, nullptr, 0, SHGFI_EXETYPE) != 0) { throw css::security::AccessControlException( "XSystemShellExecute.execute, cannot process <" + aCommand + ">", {}, {}); } + SHFILEINFOW info; if (SHGetFileInfoW(path, 0, &info, sizeof info, SHGFI_ATTRIBUTES) == 0) { throw css::lang::IllegalArgumentException(