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

Diff for /src/usr.bin/ssh/misc.c between version 1.192 and 1.193

version 1.192, 2024/04/02 09:56:58 version 1.193, 2024/04/02 10:02:08
Line 1790 
Line 1790 
 int  int
 parse_ipqos(const char *cp)  parse_ipqos(const char *cp)
 {  {
           const char *errstr;
         u_int i;          u_int i;
         char *ep;          int val;
         long val;  
   
         if (cp == NULL)          if (cp == NULL)
                 return -1;                  return -1;
Line 1801 
Line 1801 
                         return ipqos[i].value;                          return ipqos[i].value;
         }          }
         /* Try parsing as an integer */          /* Try parsing as an integer */
         val = strtol(cp, &ep, 0);          val = (int)strtonum(cp, 0, 255, &errstr);
         if (*cp == '\0' || *ep != '\0' || val < 0 || val > 255)          if (errstr)
                 return -1;                  return -1;
         return val;          return val;
 }  }

Legend:
Removed from v.1.192  
changed lines
  Added in v.1.193