* zgz: Avoid using uninitialized data as timestamp in -c mode.
Closes: #507095
* Document existing long options. Closes: #499488
+ * Avoid exposing tar file names to the shell. Closes: #500499
-- Josh Triplett <josh@freedesktop.org> Thu, 27 Nov 2008 19:54:29 -0800
$id1 == GZIP_ID1 && $id2 == GZIP_ID2 &&
$method == GZIP_METHOD_DEFLATE) {
$compression='gz';
- doit("zcat $tarball > $tempdir/origtarball");
+ open(IN, "-|", "zcat", $tarball) || die "zcat: $!";
+ open(OUT, ">", "$tempdir/origtarball") || die "$tempdir/origtarball: $!";
+ print OUT $_ while <IN>;
+ close IN || die "zcat: $!";
+ close OUT || die "$tempdir/origtarball: $!";
}
else {
seek(IN, 0, 0) || die "seek: $!";
$id1 == BZIP2_ID1 && $id2 == BZIP2_ID2 &&
$method == BZIP2_METHOD_HUFFMAN) {
$compression='bz2';
- doit("bzcat $tarball > $tempdir/origtarball");
+ open(IN, "-|", "bzcat", $tarball) || die "bzcat: $!";
+ open(OUT, ">", "$tempdir/origtarball") || die "$tempdir/origtarball: $!";
+ print OUT $_ while <IN>;
+ close IN || die "bzcat: $!";
+ close OUT || die "$tempdir/origtarball: $!";
}
}
close IN;