[BACK]Return to cipher.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/cipher.c between version 1.26.2.1 and 1.26.2.2

version 1.26.2.1, 2000/06/12 02:37:33 version 1.26.2.2, 2000/09/01 18:23:18
Line 12 
Line 12 
  */   */
   
 #include "includes.h"  #include "includes.h"
 RCSID("$Id$");  RCSID("$OpenBSD$");
   
 #include "ssh.h"  #include "ssh.h"
 #include "cipher.h"  #include "cipher.h"
Line 174 
Line 174 
 int  int
 ciphers_valid(const char *names)  ciphers_valid(const char *names)
 {  {
         char *ciphers;          char *ciphers, *cp;
         char *p;          char *p;
         int i;          int i;
   
         if (names == NULL || strcmp(names, "") == 0)          if (names == NULL || strcmp(names, "") == 0)
                 return 0;                  return 0;
         ciphers = xstrdup(names);          ciphers = cp = xstrdup(names);
         for ((p = strtok(ciphers, CIPHER_SEP)); p; (p = strtok(NULL, CIPHER_SEP))) {          for ((p = strsep(&cp, CIPHER_SEP)); p && *p != '\0';
                (p = strsep(&cp, CIPHER_SEP))) {
                 i = cipher_number(p);                  i = cipher_number(p);
                 if (i == -1 || !(cipher_mask2() & (1 << i))) {                  if (i == -1 || !(cipher_mask2() & (1 << i))) {
                         xfree(ciphers);                          xfree(ciphers);

Legend:
Removed from v.1.26.2.1  
changed lines
  Added in v.1.26.2.2