summaryrefslogtreecommitdiff
path: root/ssh-keyscan.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-09-12 18:05:05 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-09-12 18:05:05 +0000
commit520b55c8c410061c9a16417a6ec879967b1ea95a (patch)
tree80f4976d5e5e53580455f71fd8916e46036c24f4 /ssh-keyscan.c
parentd71ba5771b5c67b4efd3294ecb85dc4d10d03265 (diff)
- markus@cvs.openbsd.org 2001/08/30 22:22:32
[ssh-keyscan.c] do not pass pointers to longjmp; fix from wayne@blorf.net
Diffstat (limited to 'ssh-keyscan.c')
-rw-r--r--ssh-keyscan.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ssh-keyscan.c b/ssh-keyscan.c
index 9a9b72f4c..ad627bb99 100644
--- a/ssh-keyscan.c
+++ b/ssh-keyscan.c
@@ -7,7 +7,7 @@
7 */ 7 */
8 8
9#include "includes.h" 9#include "includes.h"
10RCSID("$OpenBSD: ssh-keyscan.c,v 1.28 2001/08/27 22:02:13 danh Exp $"); 10RCSID("$OpenBSD: ssh-keyscan.c,v 1.29 2001/08/30 22:22:32 markus Exp $");
11 11
12#if defined(HAVE_SYS_QUEUE_H) && !defined(HAVE_BOGUS_SYS_QUEUE_H) 12#if defined(HAVE_SYS_QUEUE_H) && !defined(HAVE_BOGUS_SYS_QUEUE_H)
13#include <sys/queue.h> 13#include <sys/queue.h>
@@ -68,6 +68,7 @@ size_t read_wait_size;
68int ncon; 68int ncon;
69int nonfatal_fatal = 0; 69int nonfatal_fatal = 0;
70jmp_buf kexjmp; 70jmp_buf kexjmp;
71Key *kexjmp_key;
71 72
72/* 73/*
73 * Keep a connection structure for each file descriptor. The state 74 * Keep a connection structure for each file descriptor. The state
@@ -322,7 +323,8 @@ keygrab_ssh1(con *c)
322static int 323static int
323hostjump(Key *hostkey) 324hostjump(Key *hostkey)
324{ 325{
325 longjmp(kexjmp, (int)hostkey); 326 kexjmp_key = hostkey;
327 longjmp(kexjmp, 1);
326} 328}
327 329
328static int 330static int
@@ -363,10 +365,8 @@ keygrab_ssh2(con *c)
363 xfree(c->c_kex); 365 xfree(c->c_kex);
364 c->c_kex = NULL; 366 c->c_kex = NULL;
365 packet_close(); 367 packet_close();
366 if (j < 0)
367 j = 0;
368 368
369 return (Key*)(j); 369 return j < 0? NULL : kexjmp_key;
370} 370}
371 371
372static void 372static void