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

Diff for /src/usr.bin/ssh/scp.c between version 1.187 and 1.188

version 1.187, 2016/09/12 01:22:38 version 1.188, 2017/04/27 11:53:12
Line 1022 
Line 1022 
                 if (*cp++ != ' ')                  if (*cp++ != ' ')
                         SCREWUP("mode not delimited");                          SCREWUP("mode not delimited");
   
                 for (size = 0; isdigit((unsigned char)*cp);)                  if (!isdigit((unsigned char)*cp))
                         size = size * 10 + (*cp++ - '0');                          SCREWUP("size not present");
                 if (*cp++ != ' ')                  ull = strtoull(cp, &cp, 10);
                   if (!cp || *cp++ != ' ')
                         SCREWUP("size not delimited");                          SCREWUP("size not delimited");
                   if ((off_t)ull < 0 || (unsigned long long)(off_t)ull != ull)
                           SCREWUP("size out of range");
                   size = (off_t)ull;
   
                 if ((strchr(cp, '/') != NULL) || (strcmp(cp, "..") == 0)) {                  if ((strchr(cp, '/') != NULL) || (strcmp(cp, "..") == 0)) {
                         run_err("error: unexpected filename: %s", cp);                          run_err("error: unexpected filename: %s", cp);
                         exit(1);                          exit(1);

Legend:
Removed from v.1.187  
changed lines
  Added in v.1.188