diff options
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r-- | usr.bin/ssh/sshsig.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ssh/sshsig.c b/usr.bin/ssh/sshsig.c index 356f0583b0e..7e3c6e60f8a 100644 --- a/usr.bin/ssh/sshsig.c +++ b/usr.bin/ssh/sshsig.c @@ -961,7 +961,7 @@ get_matching_principals_from_line(const char *path, u_long linenum, char *line, goto done; } done: - if (found) { + if (found && principalsp != NULL) { *principalsp = principals; principals = NULL; /* transferred */ } @@ -1024,8 +1024,8 @@ sshsig_get_pubkey(struct sshbuf *signature, struct sshkey **pubkey) struct sshkey *pk = NULL; int r = SSH_ERR_SIGNATURE_INVALID; - if (pubkey != NULL) - *pubkey = NULL; + if (pubkey == NULL) + return SSH_ERR_INTERNAL_ERROR; if ((r = sshsig_parse_preamble(signature)) != 0) return r; if ((r = sshkey_froms(signature, &pk)) != 0) |