Commit Graph

8 Commits

Author SHA1 Message Date
cem
8cb19b99f4 Use time_t for intermediate values to avoid overflow in clock_ts_to_ct
Add additionally safety and overflow checks to clock_ts_to_ct and the
BCD routines while we're here.

Perform a safety check in sys_clock_settime() first to avoid easy local
root panic, without having to propagate an error value back through
dozens of APIs currently lacking error returns.

PR:		211960, 214300
Submitted by:	Justin McOmie <justin.mcomie at gmail.com>, kib@
Reported by:	Tim Newsham <tim.newsham at nccgroup.trust>
Reviewed by:	kib@
Sponsored by:	Dell EMC Isilon, FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D9279
2017-01-24 18:05:29 +00:00
imp
4da5e292ad /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-07 00:24:33 +00:00
obrien
8b64eb1925 Use __FBSDID(). 2003-06-11 05:37:42 +00:00
peter
22f6069a2a Add $FreeBSD$ 2000-05-01 20:32:07 +00:00
phk
b9b02a56e8 Extend to handle all radix < 37 1996-01-24 20:51:26 +00:00
bde
bb2aa4f2a6 Moved BCD declarations to the correct header (libkern.h).
Fixed BCD declarations.  They didn't match their definitions...

libkern.h, bcd.c:
KNFised.  `indent' worked 99% perfectly on bcd.c.  It worked 99%
_imperfectly_ on subr_prf.c.
1996-01-16 10:23:22 +00:00
phk
cec94deabe My wife is busy making me a new conical hat, so you don't need to
send any to me this time.  Commited an old copy of this files where
the tables were swapped.  Duh!.
1996-01-15 21:26:43 +00:00
phk
62673efe98 Add the bcd <-> bin and hex -> ascii tables. 1996-01-15 10:03:49 +00:00