aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--imap-send.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/imap-send.c b/imap-send.c
index e1ad1a48c..4c1e89711 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -1209,9 +1209,10 @@ static struct store *imap_open_store(struct imap_server_conf *srvc)
goto bail;
}
if (!srvc->pass) {
- char prompt[80];
- sprintf(prompt, "Password (%s@%s): ", srvc->user, srvc->host);
- arg = git_getpass(prompt);
+ struct strbuf prompt = STRBUF_INIT;
+ strbuf_addf(&prompt, "Password (%s@%s): ", srvc->user, srvc->host);
+ arg = git_getpass(prompt.buf);
+ strbuf_release(&prompt);
if (!arg) {
perror("getpass");
exit(1);