tech-kern archive

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

Re: Fixing settime1() to reject invalid struct timespec ?



On Mon, Aug 31, 2009 at 05:42:42PM +0200, Nicolas Joly wrote:
 > +    if (ts->tv_sec < 0 || ts->tv_nsec < 0 || ts->tv_nsec >= 1000000000)
 > +            return EINVAL;
 > +

Rejecting negative tv_sec seems like a mistake - what if you want for
some reason to set the date to 1968?

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index