summaryrefslogtreecommitdiff
path: root/commit-graph.c
diff options
context:
space:
mode:
authorJohannes Sixt <j6t@kdbg.org>2025-03-17 22:59:27 +0100
committerTaylor Blau <me@ttaylorr.com>2025-05-23 17:03:30 -0400
commit9f0d1c2f7d2543cd2549cbc26e142fd199f18b45 (patch)
treebe649a2a386f1ba5b7c625b95e17830ec5080381 /commit-graph.c
parent6eb797f5d1d8885c0f08e42cc5291c11be6f11a4 (diff)
gitk: sanitize 'exec' arguments: simple cases
Tcl 'exec' assigns special meaning to its argument when they begin with redirection, pipe or background operator. There are a number of invocations of 'exec' which construct arguments that are taken from the Git repository or a user input. However, when file names or ref names are taken from the repository, it is possible to find names with have these special forms. They must not be interpreted by 'exec' lest it redirects input or output, or attempts to build a pipeline using a command name controlled by the repository. Introduce a helper function that identifies such arguments and prepends "./" to force such a name to be regarded as a relative file name. Convert those 'exec' calls where the arguments can simply be packed into a list. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Taylor Blau <me@ttaylorr.com>
Diffstat (limited to 'commit-graph.c')
0 files changed, 0 insertions, 0 deletions