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

Diff for /src/usr.bin/ssh/sftp.c between version 1.201 and 1.202

version 1.201, 2020/08/03 02:43:41 version 1.202, 2020/10/04 03:04:02
Line 1302 
Line 1302 
         const char *cmd, *cp = *cpp;          const char *cmd, *cp = *cpp;
         char *cp2, **argv;          char *cp2, **argv;
         int base = 0;          int base = 0;
         long l;          long long ll;
         int path1_mandatory = 0, i, cmdnum, optidx, argc;          int path1_mandatory = 0, i, cmdnum, optidx, argc;
   
         /* Skip leading whitespace */          /* Skip leading whitespace */
Line 1460 
Line 1460 
                 if (argc - optidx < 1)                  if (argc - optidx < 1)
                         goto need_num_arg;                          goto need_num_arg;
                 errno = 0;                  errno = 0;
                 l = strtol(argv[optidx], &cp2, base);                  ll = strtoll(argv[optidx], &cp2, base);
                 if (cp2 == argv[optidx] || *cp2 != '\0' ||                  if (cp2 == argv[optidx] || *cp2 != '\0' ||
                     ((l == LONG_MIN || l == LONG_MAX) && errno == ERANGE) ||                      ((ll == LLONG_MIN || ll == LLONG_MAX) && errno == ERANGE) ||
                     l < 0) {                      ll < 0 || ll > UINT32_MAX) {
  need_num_arg:   need_num_arg:
                         error("You must supply a numeric argument "                          error("You must supply a numeric argument "
                             "to the %s command.", cmd);                              "to the %s command.", cmd);
                         return -1;                          return -1;
                 }                  }
                 *n_arg = l;                  *n_arg = ll;
                 if (cmdnum == I_LUMASK)                  if (cmdnum == I_LUMASK)
                         break;                          break;
                 /* Get pathname (mandatory) */                  /* Get pathname (mandatory) */

Legend:
Removed from v.1.201  
changed lines
  Added in v.1.202