]> andersk Git - openssh.git/commitdiff
- markus@cvs.openbsd.org 2001/08/30 22:22:32
authormouring <mouring>
Wed, 12 Sep 2001 18:05:05 +0000 (18:05 +0000)
committermouring <mouring>
Wed, 12 Sep 2001 18:05:05 +0000 (18:05 +0000)
     [ssh-keyscan.c]
     do not pass pointers to longjmp; fix from wayne@blorf.net

ChangeLog
ssh-keyscan.c

index 8460a3a39389da42a57a1b37cbdd173abd47a0a8..d0a4351015a9ee4e7b78f8508718a3276e03cd29 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -70,6 +70,9 @@
      [auth-options.c sshd.8]
      validate ports for permitopen key file option. add host/port
      alternative syntax for IPv6. ok markus@
+   - markus@cvs.openbsd.org 2001/08/30 22:22:32
+     [ssh-keyscan.c]
+     do not pass pointers to longjmp; fix from wayne@blorf.net
 
 20010815
  - (bal) Fixed stray code in readconf.c that went in by mistake.
index 9a9b72f4c2b7ac1f6a03cce6f1700487fa00d03d..ad627bb99ea36bf3378efd8f2e335c712a65fb6a 100644 (file)
@@ -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 $");
 
 #if defined(HAVE_SYS_QUEUE_H) && !defined(HAVE_BOGUS_SYS_QUEUE_H)
 #include <sys/queue.h>
@@ -68,6 +68,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
@@ -322,7 +323,8 @@ keygrab_ssh1(con *c)
 static int
 hostjump(Key *hostkey)
 {
-       longjmp(kexjmp, (int)hostkey);
+       kexjmp_key = hostkey;
+       longjmp(kexjmp, 1);
 }
 
 static int
@@ -363,10 +365,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
This page took 0.061304 seconds and 5 git commands to generate.