summaryrefslogtreecommitdiff
path: root/NEWS
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2015-06-21 04:04:29 +0100
committerPádraig Brady <P@draigBrady.com>2015-06-22 02:02:05 +0100
commita3c3e1e9e6d2d953692f1eb24efa9ac7c7448044 (patch)
tree511d87148bec56ccc4ea3a3d4006a313fec32439 /NEWS
parent0a279f619055cc165bb3cfa3bb737cdd28ed4d70 (diff)
downloadcoreutils-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 'NEWS')
-rw-r--r--NEWS4
1 files changed, 4 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 9b86d45f6..3b3000034 100644
--- a/NEWS
+++ b/NEWS
@@ -31,6 +31,10 @@ GNU coreutils NEWS -*- outline -*-
even if the parent directory exists and has a different default context.
[bug introduced with the -Z restorecon functionality in coreutils-8.22]
+ numfmt no longer outputs incorrect overflowed values seen with certain
+ large numbers, or with numbers with increased precision.
+ [bug introduced when numfmt was added in coreutils-8.21]
+
paste no longer truncates output for large input files. This would happen
for example with files larger than 4GiB on 32 bit systems with a '\n'
character at the 4GiB position.