summaryrefslogtreecommitdiff
path: root/archival/tar.c
diff options
context:
space:
mode:
authorDenys Vlasenko2009-12-18 12:36:07 +0100
committerDenys Vlasenko2009-12-18 12:36:07 +0100
commit4b6abf6655ce664e25be2bc977b2d5e3f1946bbb (patch)
tree90a4baa3be02f2dc1eee0385bbcb222ede3e475d /archival/tar.c
parentafa2d33aa495ab243e9b1347ae0ee9c6eb30c260 (diff)
downloadbusybox-4b6abf6655ce664e25be2bc977b2d5e3f1946bbb.zip
busybox-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/tar.c')
-rw-r--r--archival/tar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/archival/tar.c b/archival/tar.c
index 5994d89..399302b 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]*