Skip to content

Commit

Permalink
Fix 'Unable to work from STDIO while reading password' when password …
Browse files Browse the repository at this point in the history
…is passed to command line parameters, courtesy of Emil Williams.
  • Loading branch information
ckolivas committed Jun 29, 2023
1 parent 0c6f6b5 commit 813f06b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ int main(int argc, char *argv[])

gettimeofday(&start_time, NULL);

if (unlikely((STDIN || STDOUT) && ENCRYPT))
if (!control->passphrase && (unlikely((STDIN || STDOUT) && ENCRYPT)))
failure("Unable to work from STDIO while reading password\n");

memcpy(&local_control, &base_control, sizeof(rzip_control));
Expand Down

0 comments on commit 813f06b

Please sign in to comment.