diff options
-rw-r--r-- | src/shared/ask-password-api.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/shared/ask-password-api.c b/src/shared/ask-password-api.c index 117f0c6687..96f16cc7f8 100644 --- a/src/shared/ask-password-api.c +++ b/src/shared/ask-password-api.c @@ -207,6 +207,11 @@ int ask_password_tty( if (ttyfd >= 0) loop_write(ttyfd, "(no echo) ", 10, false); } else { + if (p >= sizeof(passphrase)-1) { + loop_write(ttyfd, "\a", 1, false); + continue; + } + passphrase[p++] = c; if (!silent_mode && ttyfd >= 0) |