mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
openssh_new_read: fix misaimed null pointer check.
If the input key_wanted field were set to an out-of-range value, the parent structure retkey would not become NULL as a whole: instead, its field 'key' would never be set to a non-null pointer. So I was testing the wrong pointer. Fortunately, this couldn't have come up, because we don't actually have any support yet for loading the nth key from an OpenSSH new-style key file containing more than one. So key_wanted was always set to 0 by load_openssh_new_key(), which also checked that the file's key count was exactly 1 (guarding against the possibility that even 0 might have been an out-of-range index).
This commit is contained in:
parent
cddec53a40
commit
f1fe0c7d8d