diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ssh-keyscan.c | 10 |
2 files changed, 9 insertions, 6 deletions
@@ -70,6 +70,9 @@ | |||
70 | [auth-options.c sshd.8] | 70 | [auth-options.c sshd.8] |
71 | validate ports for permitopen key file option. add host/port | 71 | validate ports for permitopen key file option. add host/port |
72 | alternative syntax for IPv6. ok markus@ | 72 | alternative syntax for IPv6. ok markus@ |
73 | - markus@cvs.openbsd.org 2001/08/30 22:22:32 | ||
74 | [ssh-keyscan.c] | ||
75 | do not pass pointers to longjmp; fix from wayne@blorf.net | ||
73 | 76 | ||
74 | 20010815 | 77 | 20010815 |
75 | - (bal) Fixed stray code in readconf.c that went in by mistake. | 78 | - (bal) Fixed stray code in readconf.c that went in by mistake. |
@@ -6393,4 +6396,4 @@ | |||
6393 | - Wrote replacements for strlcpy and mkdtemp | 6396 | - Wrote replacements for strlcpy and mkdtemp |
6394 | - Released 1.0pre1 | 6397 | - Released 1.0pre1 |
6395 | 6398 | ||
6396 | $Id: ChangeLog,v 1.1505 2001/09/12 18:03:31 mouring Exp $ | 6399 | $Id: ChangeLog,v 1.1506 2001/09/12 18:05:05 mouring Exp $ |
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" |
10 | RCSID("$OpenBSD: ssh-keyscan.c,v 1.28 2001/08/27 22:02:13 danh Exp $"); | 10 | RCSID("$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; | |||
68 | int ncon; | 68 | int ncon; |
69 | int nonfatal_fatal = 0; | 69 | int nonfatal_fatal = 0; |
70 | jmp_buf kexjmp; | 70 | jmp_buf kexjmp; |
71 | Key *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) | |||
322 | static int | 323 | static int |
323 | hostjump(Key *hostkey) | 324 | hostjump(Key *hostkey) |
324 | { | 325 | { |
325 | longjmp(kexjmp, (int)hostkey); | 326 | kexjmp_key = hostkey; |
327 | longjmp(kexjmp, 1); | ||
326 | } | 328 | } |
327 | 329 | ||
328 | static int | 330 | static 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 | ||
372 | static void | 372 | static void |