Git development
 help / color / mirror / Atom feed
From: Tommi Virtanen <tv@inoi.fi>
To: git@vger.kernel.org
Cc: Tommi Virtanen <tv@inoi.fi>
Subject: [PATCH] Fix segfault in git-shell when given no argument.
Date: Fri, 25 Nov 2005 13:49:31 +0200	[thread overview]
Message-ID: <11329193711298-git-send-email-tv@inoi.fi> (raw)
In-Reply-To: 

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

                 reply	other threads:[~2005-11-25 11:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11329193711298-git-send-email-tv@inoi.fi \
    --to=tv@inoi.fi \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox