commit e605da38fce058c16efdfc56ecadcef867e81e2c
parent 5a927d1094dab529f8d1f02ee5104ed7155e12b4
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:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/git-restrict.c b/git-restrict.c
@@ -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)