mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-02-04 06:02:24 +00:00
When manually initialising a 'struct RSAKey' due to loading an SSH1
public key but not the private half, NULL out all the CRT-optimisation fields as well as the private exponent pointer. Otherwise segfaults - security-harmless, but annoying - can happen in freersakey() when we notice they aren't null and try to free them. [originally from svn r9705]
This commit is contained in:
parent
69113b16b1
commit
06b51312c1
3
cmdgen.c
3
cmdgen.c
@ -763,6 +763,9 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
ssh1key->comment = dupstr(origcomment);
|
ssh1key->comment = dupstr(origcomment);
|
||||||
ssh1key->private_exponent = NULL;
|
ssh1key->private_exponent = NULL;
|
||||||
|
ssh1key->p = NULL;
|
||||||
|
ssh1key->q = NULL;
|
||||||
|
ssh1key->iqmp = NULL;
|
||||||
} else {
|
} else {
|
||||||
ret = loadrsakey(infilename, ssh1key, passphrase, &error);
|
ret = loadrsakey(infilename, ssh1key, passphrase, &error);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user