summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/cipher.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssh/cipher.c')
-rw-r--r--crypto/openssh/cipher.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/openssh/cipher.c b/crypto/openssh/cipher.c
index bcaff02..ca77c6d 100644
--- a/crypto/openssh/cipher.c
+++ b/crypto/openssh/cipher.c
@@ -12,7 +12,7 @@
*/
#include "includes.h"
-RCSID("$Id: cipher.c,v 1.26 2000/04/14 10:30:30 markus Exp $");
+RCSID("$Id: cipher.c,v 1.27 2000/05/22 18:42:00 markus Exp $");
#include "ssh.h"
#include "cipher.h"
@@ -178,7 +178,7 @@ ciphers_valid(const char *names)
char *p;
int i;
- if (strcmp(names, "") == 0)
+ if (names == NULL || strcmp(names, "") == 0)
return 0;
ciphers = xstrdup(names);
for ((p = strtok(ciphers, CIPHER_SEP)); p; (p = strtok(NULL, CIPHER_SEP))) {
@@ -201,6 +201,8 @@ int
cipher_number(const char *name)
{
int i;
+ if (name == NULL)
+ return -1;
for (i = 0; i < sizeof(cipher_names) / sizeof(cipher_names[0]); i++)
if (strcmp(cipher_names[i], name) == 0 &&
(cipher_mask() & (1 << i)))
OpenPOWER on IntegriCloud