mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
term_get_userpass_input: missing NULL check.
If term_get_userpass_input is called with term->ldisc not yet set up, then we had a special-case handler that returns an error message - but it does it via the same subroutine that returns normal results, which also turns off the prompt callback in term->ldisc! Need an extra NULL check in that subroutine. Thanks Coverity.
This commit is contained in:
parent
d78d14f917
commit
b7a9cdd6ee
@ -7677,7 +7677,8 @@ static inline SeatPromptResult signal_prompts_t(Terminal *term, prompts_t *p,
|
||||
{
|
||||
assert(p->callback && "Asynchronous userpass input requires a callback");
|
||||
queue_toplevel_callback(p->callback, p->callback_ctx);
|
||||
ldisc_enable_prompt_callback(term->ldisc, NULL);
|
||||
if (term->ldisc)
|
||||
ldisc_enable_prompt_callback(term->ldisc, NULL);
|
||||
p->spr = spr;
|
||||
return spr;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user