From 4509b5d4a4fa645a022635bfa7e86d09b285001f Mon Sep 17 00:00:00 2001 From: "djm@openbsd.org" Date: Fri, 30 Jan 2015 01:13:33 +0000 Subject: upstream commit avoid more fatal/exit in the packet.c paths that ssh-keyscan uses; feedback and "looks good" markus@ --- ssh-keyscan.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ssh-keyscan.c') diff --git a/ssh-keyscan.c b/ssh-keyscan.c index e59eacace..989f7ecce 100644 --- a/ssh-keyscan.c +++ b/ssh-keyscan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keyscan.c,v 1.97 2015/01/28 21:15:47 djm Exp $ */ +/* $OpenBSD: ssh-keyscan.c,v 1.98 2015/01/30 01:13:33 djm Exp $ */ /* * Copyright 1995, 1996 by David Mazieres . * @@ -466,7 +466,8 @@ congreet(int s) return; } *cp = '\0'; - c->c_ssh = ssh_packet_set_connection(NULL, s, s); + if ((c->c_ssh = ssh_packet_set_connection(NULL, s, s)) == NULL) + fatal("ssh_packet_set_connection failed"); ssh_set_app_data(c->c_ssh, c); /* back link */ if (sscanf(buf, "SSH-%d.%d-%[^\n]\n", &remote_major, &remote_minor, remote_version) == 3) -- cgit v1.2.3