- fix: avoid calling getpass twice as side effect of xstrdup macro (#17672).
CVS patchset: 4179 CVS date: 2000/09/26 22:28:09
This commit is contained in:
parent
39b81b5174
commit
4893fba6f0
|
@ -221,7 +221,9 @@ static void urlFind(urlinfo *uret, int mustAsk)
|
|||
prompt = alloca(strlen(u->host) + strlen(u->user) + 256);
|
||||
sprintf(prompt, _("Password for %s@%s: "), u->user, u->host);
|
||||
if (u->password) xfree(u->password);
|
||||
u->password = xstrdup( /*@-unrecog@*/ getpass(prompt) /*@=unrecog@*/ );
|
||||
/* XXX xstrdup has side effects. */
|
||||
u->password = /*@-unrecog@*/ getpass(prompt) /*@=unrecog@*/;
|
||||
u->password = xstrdup(u->password);
|
||||
}
|
||||
|
||||
if (u->proxyh == NULL) {
|
||||
|
|
Loading…
Reference in New Issue