From ab5f86275c070331c308a133afa3a648b347c062 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 25 Nov 2005 20:57:02 -0800 Subject: [PATCH] shell.c: complain on insufficient arguments. Originally noticed by Tommi Virtanen, but done slightly differently. Signed-off-by: Junio C Hamano --- shell.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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; -- 2.26.2