Skip to content

Commit ca3898b

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

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
@@ -277,7 +277,7 @@ static void exec_woman_emacs(const char *path, const char *page)
277277
if (!path)
278278
path = "emacsclient";
279279
strbuf_addf(&man_page, "(woman \"%s\")", page);
280-
execlp(path, "emacsclient", "-e", man_page.buf, (char *)NULL);
280+
execlp(path, "emacsclient", "-e", man_page.buf, (char *)NULL); // CodeQL [SM01925] justification: Git's help system safely consumes user-controlled environment variables and paths
281281
warning_errno(_("failed to exec '%s'"), path);
282282
strbuf_release(&man_page);
283283
}
@@ -299,7 +299,7 @@ static void exec_man_konqueror(const char *path, const char *page)
299299
} else
300300
path = "kfmclient";
301301
strbuf_addf(&man_page, "man:%s(1)", page);
302-
execlp(path, filename, "newTab", man_page.buf, (char *)NULL);
302+
execlp(path, filename, "newTab", man_page.buf, (char *)NULL); // CodeQL [SM01925] justification: Git's help system safely consumes user-controlled environment variables and paths
303303
warning_errno(_("failed to exec '%s'"), path);
304304
strbuf_release(&man_page);
305305
}
@@ -309,7 +309,7 @@ static void exec_man_man(const char *path, const char *page)
309309
{
310310
if (!path)
311311
path = "man";
312-
execlp(path, "man", page, (char *)NULL);
312+
execlp(path, "man", page, (char *)NULL); // CodeQL [SM01925] justification: Git's help system safely consumes user-controlled environment variables and paths
313313
warning_errno(_("failed to exec '%s'"), path);
314314
}
315315

0 commit comments

Comments
 (0)