summaryrefslogtreecommitdiff
path: root/compat.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-05-30 13:44:51 +1000
committerDamien Miller <djm@mindrot.org>2000-05-30 13:44:51 +1000
commitb1715dc0cf5ea91707b437310f63b17bed2dc7a6 (patch)
treef7fe557697d12b37c6be6a97c6ce083d23fd07de /compat.c
parent9448c002db7427058ecca76760f3a75e379bf0a1 (diff)
- OpenBSD CVS updates:
- markus@cvs.openbsd.org [session.c] make x11-fwd work w/ localhost (xauth add host/unix:11) [cipher.c compat.c readconf.c servconf.c] check strtok() != NULL; ok niels@ [key.c] fix key_read() for uuencoded keys w/o '=' [serverloop.c] group ssh1 vs. ssh2 in serverloop [kex.c kex.h myproposal.h sshconnect2.c sshd.c] split kexinit/kexdh, factor out common code [readconf.c ssh.1 ssh.c] forwardagent defaults to no, add ssh -A - theo@cvs.openbsd.org [session.c] just some line shortening
Diffstat (limited to 'compat.c')
-rw-r--r--compat.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/compat.c b/compat.c
index 00f031b8b..967e0b6b8 100644
--- a/compat.c
+++ b/compat.c
@@ -28,7 +28,7 @@
28 */ 28 */
29 29
30#include "includes.h" 30#include "includes.h"
31RCSID("$Id: compat.c,v 1.10 2000/05/09 01:03:00 damien Exp $"); 31RCSID("$Id: compat.c,v 1.11 2000/05/30 03:44:53 damien Exp $");
32 32
33#include "ssh.h" 33#include "ssh.h"
34#include "packet.h" 34#include "packet.h"
@@ -80,10 +80,12 @@ compat_datafellows(const char *version)
80int 80int
81proto_spec(const char *spec) 81proto_spec(const char *spec)
82{ 82{
83 char *s = xstrdup(spec); 83 char *s, *p;
84 char *p;
85 int ret = SSH_PROTO_UNKNOWN; 84 int ret = SSH_PROTO_UNKNOWN;
86 85
86 if (spec == NULL)
87 return ret;
88 s = xstrdup(spec);
87 for ((p = strtok(s, SEP)); p; (p = strtok(NULL, SEP))) { 89 for ((p = strtok(s, SEP)); p; (p = strtok(NULL, SEP))) {
88 switch(atoi(p)) { 90 switch(atoi(p)) {
89 case 1: 91 case 1: