Skip to content

Commit 353f699

Browse files
committed
help: help CodeQL understand that consuming envvars is okay here
Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 28b12cf commit 353f699

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

builtin/help.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ static void exec_woman_emacs(const char *path, const char *page)
278278
if (!path)
279279
path = "emacsclient";
280280
strbuf_addf(&man_page, "(woman \"%s\")", page);
281-
execlp(path, "emacsclient", "-e", man_page.buf, (char *)NULL);
281+
execlp(path, "emacsclient", "-e", man_page.buf, (char *)NULL); // CodeQL [SM01925] justification: Git's help system safely consumes user-controlled environment variables and paths
282282
warning_errno(_("failed to exec '%s'"), path);
283283
strbuf_release(&man_page);
284284
}
@@ -300,7 +300,7 @@ static void exec_man_konqueror(const char *path, const char *page)
300300
} else
301301
path = "kfmclient";
302302
strbuf_addf(&man_page, "man:%s(1)", page);
303-
execlp(path, filename, "newTab", man_page.buf, (char *)NULL);
303+
execlp(path, filename, "newTab", man_page.buf, (char *)NULL); // CodeQL [SM01925] justification: Git's help system safely consumes user-controlled environment variables and paths
304304
warning_errno(_("failed to exec '%s'"), path);
305305
strbuf_release(&man_page);
306306
}
@@ -310,7 +310,7 @@ static void exec_man_man(const char *path, const char *page)
310310
{
311311
if (!path)
312312
path = "man";
313-
execlp(path, "man", page, (char *)NULL);
313+
execlp(path, "man", page, (char *)NULL); // CodeQL [SM01925] justification: Git's help system safely consumes user-controlled environment variables and paths
314314
warning_errno(_("failed to exec '%s'"), path);
315315
}
316316

0 commit comments

Comments
 (0)