mirror of
https://github.com/ckolivas/lrzip.git
synced 2026-01-18 14:29:57 +01:00
Refuse to perform file info from STDIN.
This commit is contained in:
parent
8a83741c32
commit
fca5d4232c
5
lrzip.c
5
lrzip.c
|
|
@ -700,7 +700,7 @@ void get_fileinfo(rzip_control *control)
|
|||
}
|
||||
}
|
||||
|
||||
/* Version < 0.4 had different file format */
|
||||
/* Versions 0.3-0.6 had different file formats */
|
||||
if (control->major_version == 0 && control->minor_version < 4)
|
||||
seekspot = 50;
|
||||
else if (control->major_version == 0 && control->minor_version == 4)
|
||||
|
|
@ -713,8 +713,7 @@ void get_fileinfo(rzip_control *control)
|
|||
fatal("Failed to lseek in get_fileinfo\n");
|
||||
|
||||
/* Read the compression type of the first block. It's possible that
|
||||
not all blocks are compressed so this may not be accurate.
|
||||
*/
|
||||
not all blocks are compressed so this may not be accurate. */
|
||||
if (unlikely(read(fd_in, &ctype, 1) != 1))
|
||||
fatal("Failed to read in get_fileinfo\n");
|
||||
|
||||
|
|
|
|||
3
main.c
3
main.c
|
|
@ -654,6 +654,9 @@ int main(int argc, char *argv[])
|
|||
if (control.infile && (strcmp(control.infile, "-") == 0))
|
||||
control.flags |= FLAG_STDIN;
|
||||
|
||||
if (INFO && STDIN)
|
||||
failure("Will not get file info from STDIN\n");
|
||||
|
||||
if (control.outname && (strcmp(control.outname, "-") == 0)) {
|
||||
control.flags |= FLAG_STDOUT;
|
||||
control.msgout = stderr;
|
||||
|
|
|
|||
Loading…
Reference in a new issue