tar: fix recently added SEGV on "tar" w/o args
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
afa2d33aa4
commit
4b6abf6655
@ -860,7 +860,7 @@ int tar_main(int argc UNUSED_PARAM, char **argv)
|
|||||||
applet_long_options = tar_longopts;
|
applet_long_options = tar_longopts;
|
||||||
#endif
|
#endif
|
||||||
#if ENABLE_DESKTOP
|
#if ENABLE_DESKTOP
|
||||||
if (argv[1][0] != '-') {
|
if (argv[1] && argv[1][0] != '-') {
|
||||||
/* Compat:
|
/* Compat:
|
||||||
* 1st argument without dash handles options with parameters
|
* 1st argument without dash handles options with parameters
|
||||||
* differently from dashed one: it takes *next argv[i]*
|
* differently from dashed one: it takes *next argv[i]*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user