mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
uxpgnt: fix an uninitialised structure field in find_key().
Thanks, Coverity - I must have been lucky that Unix Pageant in client mode hasn't so far happened to have this field come out non-NULL, or else pageant_pubkey_copy would have tried to dupstr a garbage pointer.
This commit is contained in:
parent
ac5b13398f
commit
b6b52269e1
@ -551,6 +551,7 @@ struct pageant_pubkey *find_key(const char *string, char **retstr)
|
||||
* list things.
|
||||
*/
|
||||
key_in.ssh_version = 1;
|
||||
key_in.comment = NULL;
|
||||
key_ret = pageant_pubkey_copy(&key_in);
|
||||
sfree(key_in.blob);
|
||||
filename_free(fn);
|
||||
@ -577,6 +578,7 @@ struct pageant_pubkey *find_key(const char *string, char **retstr)
|
||||
* list things.
|
||||
*/
|
||||
key_in.ssh_version = 2;
|
||||
key_in.comment = NULL;
|
||||
key_ret = pageant_pubkey_copy(&key_in);
|
||||
sfree(key_in.blob);
|
||||
filename_free(fn);
|
||||
|
Loading…
Reference in New Issue
Block a user