=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/ssh-keyscan.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- src/usr.bin/ssh/ssh-keyscan.c 2001/08/27 22:02:13 1.28 +++ src/usr.bin/ssh/ssh-keyscan.c 2001/08/30 22:22:32 1.29 @@ -7,7 +7,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-keyscan.c,v 1.28 2001/08/27 22:02:13 danh Exp $"); +RCSID("$OpenBSD: ssh-keyscan.c,v 1.29 2001/08/30 22:22:32 markus Exp $"); #include #include @@ -60,6 +60,7 @@ int ncon; int nonfatal_fatal = 0; jmp_buf kexjmp; +Key *kexjmp_key; /* * Keep a connection structure for each file descriptor. The state @@ -302,7 +303,8 @@ static int hostjump(Key *hostkey) { - longjmp(kexjmp, (int)hostkey); + kexjmp_key = hostkey; + longjmp(kexjmp, 1); } static int @@ -343,10 +345,8 @@ xfree(c->c_kex); c->c_kex = NULL; packet_close(); - if (j < 0) - j = 0; - return (Key*)(j); + return j < 0? NULL : kexjmp_key; } static void