tLimit git_cmd to 20 + 256. - git-restrict - simple utility for git repo permission management HTML git clone https://git.parazyd.org/git-restrict DIR Log DIR Files DIR Refs DIR README DIR LICENSE --- DIR commit e605da38fce058c16efdfc56ecadcef867e81e2c DIR parent 5a927d1094dab529f8d1f02ee5104ed7155e12b4 HTML Author: parazyd <parazyd@dyne.org> Date: Sun, 22 May 2022 15:03:12 +0200 Limit git_cmd to 20 + 256. 20 is the length of "git-receive-pack '<256>'" Diffstat: M git-restrict.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- DIR diff --git a/git-restrict.c b/git-restrict.c t@@ -36,7 +36,7 @@ static char *strdup(const char *s) int main(int argc, char *argv[]) { char *orig_cmd, *cmd, *repo, *buf; - char git_cmd[4096]; + char git_cmd[20 + 256]; int i, authorized = 0; if (argc < 2)