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

This commit is contained in:
Sertonix authored and Jonathan White committed 2025-11-01 19:56:11 -04:00
1 parent d9ccf767d0
commit 2cc2c905b5
1 file changed
+3 -1
+3 -1
View File
@@ -105,7 +105,9 @@ namespace Utils
SetConsoleMode(hIn, mode);
#else
struct termios t;
tcgetattr(STDIN_FILENO, &t);
if (tcgetattr(STDIN_FILENO, &t) < 0) {
return;
}
if (enable) {
t.c_lflag |= ECHO;