git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Fix segfault in git-shell when given no argument.

From
TVTommi Virtanen <tv@inoi.fi>
Date
Nov 25, 2005, 11:49 UTC
Message-ID
<11329193711298-git-send-email-tv@inoi.fi>
The bug is trivially reproducible with "git-shell -c git-receive-pack"
Signed-off-by: Tommi Virtanen <tv@inoi.fi>
---
 shell.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

applies-to: 2ada0cb8fce070b6b2c56fa689791230636f1857 4fbfea212a9afcd123a213e20388b1fa775fc7fe

diff --git a/shell.c b/shell.c
index 2c4789e..7fab432 100644
--- a/shell.c
+++ b/shell.c
@@ -5,6 +5,8 @@ static int do_generic_cmd(const char *me
 {
 	const char *my_argv[4];
 
+	if (!arg)
+		die("missing argument");
 	arg = sq_dequote(arg);
 	if (!arg)
 		die("bad argument");
---
0.99.9.GIT
Message 1 of 1 in “Fix segfault in git-shell when given no argument.”
  1. Fix segfault in git-shell when given no argument.Tommi Virtanen, Nov 25, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.