Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/crypto/external/bsd/openssh/dist CID 1356384: Check returns



details:   https://anonhg.NetBSD.org/src/rev/dced7327ea7c
branches:  trunk
changeset: 814332:dced7327ea7c
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Mar 16 20:57:46 2016 +0000

description:
CID 1356384: Check returns

diffstat:

 crypto/external/bsd/openssh/dist/ssh-keyscan.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (37 lines):

diff -r dede99c1de5b -r dced7327ea7c crypto/external/bsd/openssh/dist/ssh-keyscan.c
--- a/crypto/external/bsd/openssh/dist/ssh-keyscan.c    Wed Mar 16 20:55:54 2016 +0000
+++ b/crypto/external/bsd/openssh/dist/ssh-keyscan.c    Wed Mar 16 20:57:46 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ssh-keyscan.c,v 1.15 2016/03/11 01:55:00 christos Exp $        */
+/*     $NetBSD: ssh-keyscan.c,v 1.16 2016/03/16 20:57:46 christos Exp $        */
 /* $OpenBSD: ssh-keyscan.c,v 1.105 2016/02/15 09:47:49 dtucker Exp $ */
 
 /*
@@ -10,7 +10,7 @@
  */
 
 #include "includes.h"
-__RCSID("$NetBSD: ssh-keyscan.c,v 1.15 2016/03/11 01:55:00 christos Exp $");
+__RCSID("$NetBSD: ssh-keyscan.c,v 1.16 2016/03/16 20:57:46 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -307,6 +307,7 @@
 keyprint_one(char *host, struct sshkey *key)
 {
        char *hostport;
+       int r;
 
        if (hash_hosts && (host = host_hash(host, NULL, 0)) == NULL)
                fatal("host_hash failed");
@@ -314,7 +315,9 @@
        hostport = put_host_port(host, ssh_port);
        if (!get_cert)
                fprintf(stdout, "%s ", hostport);
-       sshkey_write(key, stdout);
+       if ((r = sshkey_write(key, stdout)) != 0)
+               error("key_write failed: %s", ssh_err(r));
+
        fputs("\n", stdout);
        free(hostport);
 }



Home | Main Index | Thread Index | Old Index