=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/compat.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- src/usr.bin/ssh/compat.c 2000/05/08 17:42:24 1.13 +++ src/usr.bin/ssh/compat.c 2000/05/22 18:42:01 1.14 @@ -28,7 +28,7 @@ */ #include "includes.h" -RCSID("$Id: compat.c,v 1.13 2000/05/08 17:42:24 markus Exp $"); +RCSID("$Id: compat.c,v 1.14 2000/05/22 18:42:01 markus Exp $"); #include "ssh.h" #include "packet.h" @@ -80,10 +80,12 @@ int proto_spec(const char *spec) { - char *s = xstrdup(spec); - char *p; + char *s, *p; int ret = SSH_PROTO_UNKNOWN; + if (spec == NULL) + return ret; + s = xstrdup(spec); for ((p = strtok(s, SEP)); p; (p = strtok(NULL, SEP))) { switch(atoi(p)) { case 1: