Commit 3cffadb5 authored by Ondrej Kozina's avatar Ondrej Kozina Committed by Milan Broz

fix possible close of unrelated fd on error path

- infd var is uninitialised on error path in case where
  maxlen is less than 1
parent ce30d5f1
......@@ -179,7 +179,7 @@ static int interactive_pass(const char *prompt, char *pass, size_t maxlen,
int infd, outfd;
if (maxlen < 1)
goto out_err;
return failed;
/* Read and write to /dev/tty if available */
infd = open("/dev/tty", O_RDWR);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment