mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
windows/console.c: add an assertion to pacify Coverity.
It complained in console_confirm_ssh_host_key that if the caller passed in a SeatDialogText containing no SDT_PROMPT record, then 'prompt' would be uninitialised. The answer is "don't do that, then", but fair enough that Coverity didn't know that. Added an assertion, which should keep it happy, and also cause better error handling if we ever _do_ make that mistake.
This commit is contained in:
parent
8c72a9daa4
commit
d216544802
@ -39,7 +39,7 @@ SeatPromptResult console_confirm_ssh_host_key(
|
||||
{
|
||||
HANDLE hin;
|
||||
DWORD savemode, i;
|
||||
const char *prompt;
|
||||
const char *prompt = NULL;
|
||||
|
||||
stdio_sink errsink[1];
|
||||
stdio_sink_init(errsink, stderr);
|
||||
@ -75,6 +75,7 @@ SeatPromptResult console_confirm_ssh_host_key(
|
||||
break;
|
||||
}
|
||||
}
|
||||
assert(prompt); /* something in the SeatDialogText should have set this */
|
||||
|
||||
while (true) {
|
||||
fprintf(stderr,
|
||||
|
Loading…
Reference in New Issue
Block a user