{"thread":{"id":"2674","subject":"[PATCH] Fix segfault in git-shell when given no argument.","startedAt":"2005-11-25T11:49:31Z","lastAt":"2005-11-25T11:49:31Z","messageCount":1,"participants":["Tommi Virtanen"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"12729","messageId":"11329193711298-git-send-email-tv@inoi.fi","threadId":"2674","inReplyTo":null,"subject":"[PATCH] Fix segfault in git-shell when given no argument.","fromName":"Tommi Virtanen","fromEmail":"tv@inoi.fi","sentAt":"2005-11-25T11:49:31Z","receivedAt":"2005-11-25T11:49:31Z","isPatch":true,"sender":{"key":"tv@debian.org","avatar":null},"body":"The bug is trivially reproducible with \"git-shell -c git-receive-pack\"\n\nSigned-off-by: Tommi Virtanen <tv@inoi.fi>\n\n---\n\n shell.c |    2 ++\n 1 files changed, 2 insertions(+), 0 deletions(-)\n\napplies-to: 2ada0cb8fce070b6b2c56fa689791230636f1857\n4fbfea212a9afcd123a213e20388b1fa775fc7fe\ndiff --git a/shell.c b/shell.c\nindex 2c4789e..7fab432 100644\n--- a/shell.c\n+++ b/shell.c\n@@ -5,6 +5,8 @@ static int do_generic_cmd(const char *me\n {\n \tconst char *my_argv[4];\n \n+\tif (!arg)\n+\t\tdie(\"missing argument\");\n \targ = sq_dequote(arg);\n \tif (!arg)\n \t\tdie(\"bad argument\");\n---\n0.99.9.GIT\n"}]}