From 4b6abf6655ce664e25be2bc977b2d5e3f1946bbb Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 18 Dec 2009 12:36:07 +0100 Subject: [PATCH] tar: fix recently added SEGV on "tar" w/o args Signed-off-by: Denys Vlasenko --- archival/tar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archival/tar.c b/archival/tar.c index 5994d8913..399302bfd 100644 --- a/archival/tar.c +++ b/archival/tar.c @@ -860,7 +860,7 @@ int tar_main(int argc UNUSED_PARAM, char **argv) applet_long_options = tar_longopts; #endif #if ENABLE_DESKTOP - if (argv[1][0] != '-') { + if (argv[1] && argv[1][0] != '-') { /* Compat: * 1st argument without dash handles options with parameters * differently from dashed one: it takes *next argv[i]* -- 2.25.1