mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Fix mis-merges from the 0.80 branch.
As I mentioned in the previous commit, this merge was nontrivial enough that it wasn't a good idea for the release checklist to suggest doing it in a hurry. And indeed, now I look at it again this morning, there are mistakes: a memory leak of ConsoleIO on the abort path from both affected functions, and a missing space in one of the prompt messages. Now both fixed.
This commit is contained in:
parent
f0265167b1
commit
b846178443
@ -389,8 +389,10 @@ SeatPromptResult console_confirm_ssh_host_key(
|
|||||||
SeatPromptResult result;
|
SeatPromptResult result;
|
||||||
|
|
||||||
const char *prompt = console_print_seatdialogtext(conio, text);
|
const char *prompt = console_print_seatdialogtext(conio, text);
|
||||||
if (!prompt)
|
if (!prompt) {
|
||||||
return SPR_SW_ABORT("Cannot confirm a host key in batch mode");
|
result = SPR_SW_ABORT("Cannot confirm a host key in batch mode");
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
ResponseType response;
|
ResponseType response;
|
||||||
|
|
||||||
@ -430,7 +432,7 @@ SeatPromptResult console_confirm_ssh_host_key(
|
|||||||
put_dataz(conio, console_abandoned_msg);
|
put_dataz(conio, console_abandoned_msg);
|
||||||
result = SPR_USER_ABORT;
|
result = SPR_USER_ABORT;
|
||||||
}
|
}
|
||||||
|
out:
|
||||||
conio_free(conio);
|
conio_free(conio);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -443,11 +445,13 @@ SeatPromptResult console_confirm_weak_crypto_primitive(
|
|||||||
SeatPromptResult result;
|
SeatPromptResult result;
|
||||||
|
|
||||||
const char *prompt = console_print_seatdialogtext(conio, text);
|
const char *prompt = console_print_seatdialogtext(conio, text);
|
||||||
if (!prompt)
|
if (!prompt) {
|
||||||
return SPR_SW_ABORT("Cannot confirm a weak crypto primitive "
|
result = SPR_SW_ABORT("Cannot confirm a weak crypto primitive "
|
||||||
"in batch mode");
|
"in batch mode");
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
put_fmt(conio, "%s (y/n)", prompt);
|
put_fmt(conio, "%s (y/n) ", prompt);
|
||||||
|
|
||||||
ResponseType response = parse_and_free_response(
|
ResponseType response = parse_and_free_response(
|
||||||
console_read_line(conio, true));
|
console_read_line(conio, true));
|
||||||
@ -458,7 +462,7 @@ SeatPromptResult console_confirm_weak_crypto_primitive(
|
|||||||
put_dataz(conio, console_abandoned_msg);
|
put_dataz(conio, console_abandoned_msg);
|
||||||
result = SPR_USER_ABORT;
|
result = SPR_USER_ABORT;
|
||||||
}
|
}
|
||||||
|
out:
|
||||||
conio_free(conio);
|
conio_free(conio);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user