Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | make fixed-sized fixed-value mib[] arrays be const | 2020-10-12 | 1 | -4/+4 | |
| | | | | ok guenther tb millert | ||||
* | Calling llabs(LLONG_MIN) is undefined behavior, llvm 7.0.1 does not | 2019-01-14 | 1 | -5/+9 | |
| | | | | | | work with our old code. In fmt_scaled() move the check before calling llabs(). found by regress/lib/libutil/fmt_scaled; OK deraadt@ millert@ tedu@ | ||||
* | constrain fractional part to [0-9] (less confusing to static analysis); ok ian@ | 2018-05-14 | 1 | -2/+5 | |
| | |||||
* | Fix overly-conservative overflow checks on mulitplications and add checks | 2017-03-16 | 1 | -3/+11 | |
| | | | | | on additions. This allows scan_scaled to work up to +/-LLONG_MAX (LLONG_MIN will still be flagged as a range error). ok millert@ | ||||
* | Collapse underflow and overflow checks into a single block. | 2017-03-15 | 1 | -7/+4 | |
| | | | | ok djm@ millert@ | ||||
* | Catch integer underflow in scan_scaled reported by Nicolas Iooss. | 2017-03-15 | 1 | -1/+6 | |
| | | | | ok deraadt@ djm@ | ||||
* | fix signed integer overflow in scan_scaled. Found by Nicolas Iooss | 2017-03-11 | 1 | -1/+14 | |
| | | | | using AFL against ssh_config. ok deraadt@ millert@ | ||||
* | fairly simple unsigned char casts for ctype | 2013-11-29 | 1 | -5/+6 | |
| | | | | ok krw | ||||
* | make scan_scaled set errno to EINVAL rather than ERANGE if it encounters | 2012-11-12 | 1 | -2/+4 | |
| | | | | | | an invalid multiplier, like the man page says it should "looks sensible" deraadt@, ok ian@ | ||||
* | use llabs instead of the home-grown version; and some comment changes | 2009-06-20 | 1 | -4/+4 | |
| | | | | ok ian@, millert@ | ||||
* | remove some bogus *p from charles longeau | 2007-03-20 | 1 | -4/+4 | |
| | | | | ok deraadt millert | ||||
* | library routines should not be checking for NULL pointers passed in, | 2005-10-19 | 1 | -11/+1 | |
| | | | | | | and then setting errno to EFAULT. that is balony programming! they should keep stumbling along to purposely create a crash, so that the programmer stops doing that kind of stupid crap. ok otto | ||||
* | scrape $Id$ tags. | 2005-08-02 | 1 | -5/+1 | |
| | | | | okay deraadt@, millert@, krw@ | ||||
* | Fix rounding of fractionless numbers. ok tom@ miod@ | 2005-03-09 | 1 | -4/+10 | |
| | |||||
* | Fix sizing of fraction. ok tom@ deraadt@ | 2005-03-08 | 1 | -9/+4 | |
| | |||||
* | fix 1099512676352 -> 2.0T; ok miod@ | 2004-09-16 | 1 | -3/+3 | |
| | |||||
* | knf; otto ok | 2004-05-28 | 1 | -3/+4 | |
| | |||||
* | o Do not drop unit when printing -100 | 2003-12-27 | 1 | -5/+8 | |
| | | | | | | | o Round negative numbers correctly o Do not print fractional valus for byte values ok ian@ henning@ | ||||
* | New: fmt_scaled() and scan_scaled() convert to and from "human readable" | 2003-05-15 | 1 | -0/+277 | |
or scaled numbers. fmt_scaled, and the format, based on Ken Stailey's code for "df -h"; scan_scaled is new. Significantly commented on and reworked by pjanzen@; other comments from millert@. OK pjanzen@. |