NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/36997 (ping doesn't verify limits)



The following reply was made to PR bin/36997; it has been noted by GNATS.

From: David Holland <dholland-bugs%netbsd.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: bin/36997 (ping doesn't verify limits)
Date: Sun, 18 Dec 2016 01:58:05 +0000

 On Mon, Sep 17, 2007 at 10:15:00 +0000, Zafer Aydogan wrote:
  > +                       if (npackets <= 0 || npackets > INT_MAX)
  > +                               errx(1, "Bad number of packets");
 
 Unfortunately, it doesn't work too well to test an int for being
 greater than INT_MAX :-)
 
 The changes I made are mostly different, but should cover the same
 territory, except that I don't see any reason to limit the -w value;
 it's not an integer and it's not converted to one later on.
 
 -- 
 David A. Holland
 dholland%netbsd.org@localhost
 


Home | Main Index | Thread Index | Old Index