Encryption is not possible for stdin or stdout.

This commit is contained in:
Con Kolivas 2021-02-15 15:28:46 +11:00
parent be884d09e0
commit a0bacc90ee

4
main.c
View file

@ -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)