CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2019/03/26 10:02:55
Modified files:
lib/libc/sys : adjtime.2
sys/kern : kern_time.c
Log message:
adjtime(2): set EINVAL if delta overflows 64 bits of microseconds.
No other (known) BSD-derived adjtime(2) implementation checks for overflow
when converting delta into its final denomination of fractional seconds.
This is peculiar, as the call originates in 4.3BSD.
However, glibc, uclibc, and (to an extent) musl /do/ check the input and set
EINVAL if it exceeds a certain bound, so we'll just use the errno that they
use to be consistent with extant practice.
Prompted by the comment kettenis@ left when we switched to storing the
adjustment in an int64_t like ~5 years ago (kern_time.c,v 1.87).
Positive feedback from deraadt@, manpage bits ok jmc@,
no code complaints from otto@ or tedu@.