summaryrefslogtreecommitdiff
path: root/openbsd-compat/fmt_scaled.c
Commit message (Collapse)AuthorAgeFilesLines
* Resync fmt_scaled. with OpenBSD.Darren Tucker2022-03-111-13/+19
| | | | Fixes underflow reported in bz#3401.
* sync fmt_scaled.cDamien Miller2018-05-141-2/+5
| | | | | | | revision 1.17 date: 2018/05/14 04:39:04; author: djm; state: Exp; lines: +5 -2; commitid: 53zY8GjViUBnWo8Z; constrain fractional part to [0-9] (less confusing to static analysis); ok ian@
* Many typo fixes from Karsten WeissDamien Miller2018-04-101-1/+1
| | | | Spotted using https://github.com/lucasdemarchi/codespell
* Import fmt_scaled.c rev 1.16 from OpenBSD.Darren Tucker2017-03-291-3/+11
| | | | | | Fix overly-conservative overflow checks on mulitplications and add checks on additions. This allows scan_scaled to work up to +/-LLONG_MAX (LLONG_MIN will still be flagged as a range error). ok millert@
* Import fmt_scaled.c rev 1.15 from OpenBSD.Darren Tucker2017-03-291-7/+4
| | | | | Collapse underflow and overflow checks into a single block. ok djm@ millert@
* Import fmt_scaled.c rev 1.14 from OpenBSD.Darren Tucker2017-03-291-1/+6
| | | | | Catch integer underflow in scan_scaled reported by Nicolas Iooss. ok deraadt@ djm@
* sync fmt_scaled.c with OpenBSDDamien Miller2017-03-121-9/+25
| | | | | | | | | | | | | | | | | | | | | | | | | revision 1.13 date: 2017/03/11 23:37:23; author: djm; state: Exp; lines: +14 -1; commitid: jnFKyHkB3CEiEZ2R; fix signed integer overflow in scan_scaled. Found by Nicolas Iooss using AFL against ssh_config. ok deraadt@ millert@ ---------------------------- revision 1.12 date: 2013/11/29 19:00:51; author: deraadt; state: Exp; lines: +6 -5; fairly simple unsigned char casts for ctype ok krw ---------------------------- revision 1.11 date: 2012/11/12 14:07:20; author: halex; state: Exp; lines: +4 -2; make scan_scaled set errno to EINVAL rather than ERANGE if it encounters an invalid multiplier, like the man page says it should "looks sensible" deraadt@, ok ian@ ---------------------------- revision 1.10 date: 2009/06/20 15:00:04; author: martynas; state: Exp; lines: +4 -4; use llabs instead of the home-grown version; and some comment changes ok ian@, millert@ ----------------------------
* - (djm) [configure.ac mux.c sftp.c openbsd-compat/Makefile.in]Damien Miller2008-05-201-0/+274
[openbsd-compat/fmt_scaled.c openbsd-compat/openbsd-compat.h] Fix compilation on Linux, including pulling in fmt_scaled(3) implementation from OpenBSD's libutil.