Fix segfault when testing if reaidng from stdin "-"

1_00_stable_10817
Glenn L McGrath 2002-10-06 23:25:23 +00:00
parent e0f5500bb5
commit 2983330512
1 changed files with 3 additions and 1 deletions

View File

@ -694,7 +694,9 @@ int tar_main(int argc, char **argv)
}
}
if (*argv[optind] == '-') {
/* Check if we are reading from stdin */
if ((argv[optind]) && (*argv[optind] == '-')) {
/* Default is to read from stdin, so just skip to next arg */
optind++;
}