summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-12-18 11:36:07 (GMT)
committer Denys Vlasenko <vda.linux@googlemail.com>2009-12-18 11:36:07 (GMT)
commit4b6abf6655ce664e25be2bc977b2d5e3f1946bbb (patch)
tree90a4baa3be02f2dc1eee0385bbcb222ede3e475d
parentafa2d33aa495ab243e9b1347ae0ee9c6eb30c260 (diff)
downloadbusybox-4b6abf6655ce664e25be2bc977b2d5e3f1946bbb.tar.gz
busybox-4b6abf6655ce664e25be2bc977b2d5e3f1946bbb.tar.bz2
tar: fix recently added SEGV on "tar" w/o args
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-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]*