Skip to content

Commit fe93246

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

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎builtin/help.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ static void exec_woman_emacs(const char *path, const char *page)
302302
if (!path)
303303
path = "emacsclient";
304304
strbuf_addf(&man_page, "(woman \"%s\")", page);
305-
execlp(path, "emacsclient", "-e", man_page.buf, (char *)NULL);
305+
execlp(path, "emacsclient", "-e", man_page.buf, (char *)NULL); // CodeQL [SM01925] justification: Git's help system safely consumes user-controlled environment variables and paths
306306
warning_errno(_("failed to exec '%s'"), path);
307307
strbuf_release(&man_page);
308308
}
@@ -324,7 +324,7 @@ static void exec_man_konqueror(const char *path, const char *page)
324324
} else
325325
path = "kfmclient";
326326
strbuf_addf(&man_page, "man:%s(1)", page);
327-
execlp(path, filename, "newTab", man_page.buf, (char *)NULL);
327+
execlp(path, filename, "newTab", man_page.buf, (char *)NULL); // CodeQL [SM01925] justification: Git's help system safely consumes user-controlled environment variables and paths
328328
warning_errno(_("failed to exec '%s'"), path);
329329
strbuf_release(&man_page);
330330
}
@@ -334,7 +334,7 @@ static void exec_man_man(const char *path, const char *page)
334334
{
335335
if (!path)
336336
path = "man";
337-
execlp(path, "man", page, (char *)NULL);
337+
execlp(path, "man", page, (char *)NULL); // CodeQL [SM01925] justification: Git's help system safely consumes user-controlled environment variables and paths
338338
warning_errno(_("failed to exec '%s'"), path);
339339
}
340340

0 commit comments

Comments
 (0)