From: Junio C Hamano Date: Sat, 26 Nov 2005 04:57:02 +0000 (-0800) Subject: shell.c: complain on insufficient arguments. X-Git-Tag: v0.99.9l^2~60 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ab5f86275c070331c308a133afa3a648b347c062;p=git.git shell.c: complain on insufficient arguments. Originally noticed by Tommi Virtanen, but done slightly differently. Signed-off-by: Junio C Hamano --- diff --git a/shell.c b/shell.c index 2c4789e94..cd316185e 100644 --- a/shell.c +++ b/shell.c @@ -5,8 +5,7 @@ static int do_generic_cmd(const char *me, char *arg) { const char *my_argv[4]; - arg = sq_dequote(arg); - if (!arg) + if (!arg || !(arg = sq_dequote(arg))) die("bad argument"); my_argv[0] = me;