diff options
author | Pádraig Brady <P@draigBrady.com> | 2015-06-21 04:04:29 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2015-06-22 02:02:05 +0100 |
commit | a3c3e1e9e6d2d953692f1eb24efa9ac7c7448044 (patch) | |
tree | 511d87148bec56ccc4ea3a3d4006a313fec32439 /THANKStt.in | |
parent | 0a279f619055cc165bb3cfa3bb737cdd28ed4d70 (diff) | |
download | coreutils-a3c3e1e9e6d2d953692f1eb24efa9ac7c7448044.tar.xz |
numfmt: avoid integer overflow when rounding
Due to existing limits this is usually triggered
with an increased precision. We also add further
restrictions to the output of increased precision numbers.
* src/numfmt.c (simple_round): Avoid intmax_t overflow.
(simple_strtod_int): Count digits consistently
for precision loss and overflow detection.
(prepare_padded_number): Include the precision
when excluding numbers to output, since the precision
determines the ultimate values used in the rounding scheme
in double_to_human().
* tests/misc/numfmt.pl: Add previously failing test cases.
* NEWS: Mention the fix.
Diffstat (limited to 'THANKStt.in')
0 files changed, 0 insertions, 0 deletions