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

Diff for /src/usr.bin/ssh/authfile.c between version 1.134 and 1.135

version 1.134, 2019/08/05 11:50:33 version 1.135, 2019/09/03 08:30:47
Line 523 
Line 523 
         }          }
 }  }
   
   /*
    * Advanced *cpp past the end of key options, defined as the first unquoted
    * whitespace character. Returns 0 on success or -1 on failure (e.g.
    * unterminated quotes).
    */
   int
   sshkey_advance_past_options(char **cpp)
   {
           char *cp = *cpp;
           int quoted = 0;
   
           for (; *cp && (quoted || (*cp != ' ' && *cp != '\t')); cp++) {
                   if (*cp == '\\' && cp[1] == '"')
                           cp++;   /* Skip both */
                   else if (*cp == '"')
                           quoted = !quoted;
           }
           *cpp = cp;
           /* return failure for unterminated quotes */
           return (*cp == '\0' && quoted) ? -1 : 0;
   }
   

Legend:
Removed from v.1.134  
changed lines
  Added in v.1.135