1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Fix potential null-pointer dereference in ssh_reconfig.

ssh->base_layer is NULL when the connection is still in its early
stages, before greetings are exchanged. If the user invokes the Change
Settings dialog in this situation, ssh_reconfig would call
ssh_ppl_reconfigure() on ssh->base_layer without checking if it was
NULL first.
This commit is contained in:
Simon Tatham 2023-04-10 16:13:36 +01:00
parent 6a27ae772c
commit d67c13eeb8

View File

@ -1038,7 +1038,8 @@ static void ssh_reconfig(Backend *be, Conf *conf)
if (ssh->pinger)
pinger_reconfig(ssh->pinger, ssh->conf, conf);
ssh_ppl_reconfigure(ssh->base_layer, conf);
if (ssh->base_layer)
ssh_ppl_reconfigure(ssh->base_layer, conf);
conf_free(ssh->conf);
ssh->conf = conf_copy(conf);