From 9d496236c5e722d6acb921862bdafe6f844a56a6 Mon Sep 17 00:00:00 2001 From: ckolivas Date: Thu, 17 Mar 2011 13:08:36 +1100 Subject: [PATCH] Read remainder of magic information for ver06 files when reading from STDIN. Refuse to decompress encrypted files from STDIN as well. --- lrzip.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lrzip.c b/lrzip.c index 5101462..621af5a 100644 --- a/lrzip.c +++ b/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"); magic[i] = (char)tmpchar; } + get_magicver06(control, magic); } } @@ -590,6 +591,8 @@ void decompress_file(rzip_control *control) if (STDIN) { fd_in = open_tmpinfile(control); read_tmpinmagic(control); + if (ENCRYPT) + failure("Cannot decompress encrypted file from STDIN\n"); expected_size = control->st_size; open_tmpinbuf(control); } else {