mirror of
https://github.com/ckolivas/lrzip.git
synced 2025-12-06 07:12:00 +01:00
Read remainder of magic information for ver06 files when reading from STDIN.
Refuse to decompress encrypted files from STDIN as well.
This commit is contained in:
parent
ae63349e3c
commit
9d496236c5
3
lrzip.c
3
lrzip.c
|
|
@ -373,6 +373,7 @@ static void read_tmpinmagic(rzip_control *control)
|
||||||
failure("Reached end of file on STDIN prematurely on v06 magic read\n");
|
failure("Reached end of file on STDIN prematurely on v06 magic read\n");
|
||||||
magic[i] = (char)tmpchar;
|
magic[i] = (char)tmpchar;
|
||||||
}
|
}
|
||||||
|
get_magicver06(control, magic);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -590,6 +591,8 @@ void decompress_file(rzip_control *control)
|
||||||
if (STDIN) {
|
if (STDIN) {
|
||||||
fd_in = open_tmpinfile(control);
|
fd_in = open_tmpinfile(control);
|
||||||
read_tmpinmagic(control);
|
read_tmpinmagic(control);
|
||||||
|
if (ENCRYPT)
|
||||||
|
failure("Cannot decompress encrypted file from STDIN\n");
|
||||||
expected_size = control->st_size;
|
expected_size = control->st_size;
|
||||||
open_tmpinbuf(control);
|
open_tmpinbuf(control);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue