mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
Fix the inverted return values in pageant_add_ssh*_key().
This would have caused intermittent use-after-free crashes in Windows Pageant, but only with keys added via the primary Pageant's own UI or command line - not keys submitted from another process, because those don't go through the same function.
This commit is contained in:
parent
5e2443ff1f
commit
4a875b5f8b
@ -954,12 +954,12 @@ int pageant_count_ssh2_keys(void)
|
|||||||
|
|
||||||
int pageant_add_ssh1_key(struct RSAKey *rkey)
|
int pageant_add_ssh1_key(struct RSAKey *rkey)
|
||||||
{
|
{
|
||||||
return add234(rsakeys, rkey) != rkey;
|
return add234(rsakeys, rkey) == rkey;
|
||||||
}
|
}
|
||||||
|
|
||||||
int pageant_add_ssh2_key(struct ssh2_userkey *skey)
|
int pageant_add_ssh2_key(struct ssh2_userkey *skey)
|
||||||
{
|
{
|
||||||
return add234(ssh2keys, skey) != skey;
|
return add234(ssh2keys, skey) == skey;
|
||||||
}
|
}
|
||||||
|
|
||||||
int pageant_delete_ssh1_key(struct RSAKey *rkey)
|
int pageant_delete_ssh1_key(struct RSAKey *rkey)
|
||||||
|
Loading…
Reference in New Issue
Block a user