diff options
author | 2001-08-30 22:22:32 +0000 | |
---|---|---|
committer | 2001-08-30 22:22:32 +0000 | |
commit | e323f4b6350c1f6cc4b745b1ebdc3ba387bed36c (patch) | |
tree | 6236cf60b49be07facad14625e1c5b2b3ae882ec /usr.bin/ssh/ssh-keyscan.c | |
parent | Remove duplicates with m68k/m68k/genassym.cf (diff) | |
download | wireguard-openbsd-e323f4b6350c1f6cc4b745b1ebdc3ba387bed36c.tar.xz wireguard-openbsd-e323f4b6350c1f6cc4b745b1ebdc3ba387bed36c.zip |
do not pass pointers to longjmp; fix from wayne@blorf.net
Diffstat (limited to 'usr.bin/ssh/ssh-keyscan.c')
-rw-r--r-- | usr.bin/ssh/ssh-keyscan.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/ssh/ssh-keyscan.c b/usr.bin/ssh/ssh-keyscan.c index 96471067661..08af3ccdf23 100644 --- a/usr.bin/ssh/ssh-keyscan.c +++ b/usr.bin/ssh/ssh-keyscan.c @@ -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 <sys/queue.h> #include <errno.h> @@ -60,6 +60,7 @@ size_t read_wait_size; 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 @@ keygrab_ssh1(con *c) static int hostjump(Key *hostkey) { - longjmp(kexjmp, (int)hostkey); + kexjmp_key = hostkey; + longjmp(kexjmp, 1); } static int @@ -343,10 +345,8 @@ keygrab_ssh2(con *c) 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 |