Fix uninitialized memory when --pw-stdin is used with a pipe

This commit is contained in:
Sertonix
2025-04-27 17:12:00 +02:00
committed by Jonathan White
parent d9ccf767d0
commit 2cc2c905b5

View File

@@ -105,7 +105,9 @@ namespace Utils
SetConsoleMode(hIn, mode); SetConsoleMode(hIn, mode);
#else #else
struct termios t; struct termios t;
tcgetattr(STDIN_FILENO, &t); if (tcgetattr(STDIN_FILENO, &t) < 0) {
return;
}
if (enable) { if (enable) {
t.c_lflag |= ECHO; t.c_lflag |= ECHO;