summaryrefslogtreecommitdiff
path: root/libbb/bb_askpass.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/bb_askpass.c')
-rw-r--r--libbb/bb_askpass.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libbb/bb_askpass.c b/libbb/bb_askpass.c
index 1927ba9..c2580b9 100644
--- a/libbb/bb_askpass.c
+++ b/libbb/bb_askpass.c
@@ -1,7 +1,6 @@
/* vi: set sw=4 ts=4: */
/*
* Ask for a password
- * I use a static buffer in this function. Plan accordingly.
*
* Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
*
@@ -23,8 +22,8 @@ char* FAST_FUNC bb_ask(const int fd, int timeout, const char *prompt)
{
/* Was static char[BIGNUM] */
enum { sizeof_passwd = 128 };
- static char *passwd;
+ char *passwd;
char *ret;
int i;
struct sigaction sa, oldsa;
@@ -62,8 +61,7 @@ char* FAST_FUNC bb_ask(const int fd, int timeout, const char *prompt)
alarm(timeout);
}
- if (!passwd)
- passwd = xmalloc(sizeof_passwd);
+ passwd = auto_string(xmalloc(sizeof_passwd));
ret = passwd;
i = 0;
while (1) {