From: Mark Levedahl Date: Thu, 3 Apr 2025 04:37:08 +0000 (-0400) Subject: git-gui: avoid auto_execok in do_windows_shortcut X-Git-Tag: v2.43.7~4^2~1^2~4 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=00c7aa86e905175476e0dff149d570b48c34c8f1;p=thirdparty%2Fgit.git git-gui: avoid auto_execok in do_windows_shortcut git-gui on Windows uses auto_execok to locate git-gui.exe, which performs the same flawed search as does the builtin exec. Use _which instead, performing a safe PATH lookup. Signed-off-by: Mark Levedahl Signed-off-by: Johannes Sixt Signed-off-by: Taylor Blau --- diff --git a/lib/shortcut.tcl b/lib/shortcut.tcl index 674a41f5e0..263f4899c9 100644 --- a/lib/shortcut.tcl +++ b/lib/shortcut.tcl @@ -12,7 +12,7 @@ proc do_windows_shortcut {} { set fn ${fn}.lnk } # Use git-gui.exe if available (ie: git-for-windows) - set cmdLine [auto_execok git-gui.exe] + set cmdLine [list [_which git-gui]] if {$cmdLine eq {}} { set cmdLine [list [info nameofexecutable] \ [file normalize $::argv0]]