From a0bacc90eebd677ffb0ad123ba6ded3328d92995 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Mon, 15 Feb 2021 15:28:46 +1100 Subject: [PATCH] Encryption is not possible for stdin or stdout. --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 7e6c131..4987173 100644 --- a/main.c +++ b/main.c @@ -696,8 +696,8 @@ recursion: gettimeofday(&start_time, NULL); - if (unlikely(STDIN && ENCRYPT)) - failure("Unable to work from STDIN while reading password\n"); + if (unlikely((STDIN || STDOUT) && ENCRYPT)) + failure("Unable to work from STDIO while reading password\n"); memcpy(&local_control, &base_control, sizeof(rzip_control)); if (DECOMPRESS || TEST_ONLY)