summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/compat.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssh/compat.c')
-rw-r--r--crypto/openssh/compat.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/crypto/openssh/compat.c b/crypto/openssh/compat.c
index 33e509c..1dd0c39 100644
--- a/crypto/openssh/compat.c
+++ b/crypto/openssh/compat.c
@@ -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 @@ compat_datafellows(const char *version)
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:
OpenPOWER on IntegriCloud