aboutsummaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-12-18 12:36:07 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2009-12-18 12:36:07 +0100
commit4b6abf6655ce664e25be2bc977b2d5e3f1946bbb (patch)
tree90a4baa3be02f2dc1eee0385bbcb222ede3e475d /archival
parentafa2d33aa495ab243e9b1347ae0ee9c6eb30c260 (diff)
downloadbusybox-4b6abf6655ce664e25be2bc977b2d5e3f1946bbb.tar.gz
tar: fix recently added SEGV on "tar" w/o args
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival')
-rw-r--r--archival/tar.c2
1 files changed, 1 insertions, 1 deletions
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]*