aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2002-10-06 23:25:23 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2002-10-06 23:25:23 +0000
commit2983330512e0f1a09ef881034a5e1c02d3fe2c7b (patch)
treedf089bbada7e04d0e7af1bbaade56c9c98a5aa82
parente0f5500bb577addcd26217737401f83c5cd293c2 (diff)
downloadbusybox-w32-2983330512e0f1a09ef881034a5e1c02d3fe2c7b.tar.gz
busybox-w32-2983330512e0f1a09ef881034a5e1c02d3fe2c7b.tar.bz2
busybox-w32-2983330512e0f1a09ef881034a5e1c02d3fe2c7b.zip
Fix segfault when testing if reaidng from stdin "-"
-rw-r--r--archival/tar.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/archival/tar.c b/archival/tar.c
index 88a815de6..e6c134e3b 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -694,7 +694,9 @@ int tar_main(int argc, char **argv)
694 } 694 }
695 } 695 }
696 696
697 if (*argv[optind] == '-') { 697 /* Check if we are reading from stdin */
698 if ((argv[optind]) && (*argv[optind] == '-')) {
699 /* Default is to read from stdin, so just skip to next arg */
698 optind++; 700 optind++;
699 } 701 }
700 702