mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-01 03:22:48 -05:00
Fix null-pointer dereferences in CA config.
Introduced in dc7ba12253
earlier today. On GTK these caused no
problems worse than a GTK warning, but I'd better fix them before they
(potentially) do worse on Windows!
This commit is contained in:
@ -75,7 +75,7 @@ static void ca_refresh_name_list(struct ca_state *st)
|
||||
static void set_from_hca(struct ca_state *st, host_ca *hca)
|
||||
{
|
||||
sfree(st->name);
|
||||
st->name = dupstr(hca->name);
|
||||
st->name = dupstr(hca->name ? hca->name : "");
|
||||
|
||||
sfree(st->pubkey);
|
||||
if (hca->ca_public_key)
|
||||
@ -405,6 +405,7 @@ void setup_ca_config_box(struct controlbox *b)
|
||||
memset(st, 0, sizeof(*st));
|
||||
st->ca_names = newtree234(ca_name_compare);
|
||||
st->host_wcs = newtree234(ca_name_compare);
|
||||
st->wc = dupstr("");
|
||||
ca_refresh_name_list(st);
|
||||
|
||||
/* Initialise the settings to a default blank host_ca */
|
||||
|
Reference in New Issue
Block a user