mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Fix out-of-bounds access in Windows CLI tools.
Commit c6ff548ae0
introduced this when not re-using an existing shared
connection.
This commit is contained in:
parent
fb130bf6da
commit
aef7640bba
@ -39,6 +39,7 @@ void cli_main_loop(cliloop_pre_t pre, cliloop_post_t post, void *ctx)
|
||||
size_t extra_base = nhandles;
|
||||
if (winselcli_event != INVALID_HANDLE_VALUE) {
|
||||
winselcli_index = extra_base++;
|
||||
handles = sresize(handles, extra_base, HANDLE);
|
||||
handles[winselcli_index] = winselcli_event;
|
||||
}
|
||||
size_t total_handles = extra_base + n_extra_handles;
|
||||
|
Loading…
Reference in New Issue
Block a user