From 51a8f707131c36d7a88753e3bee839b2a4a336e4 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 1 Jun 2013 19:20:06 -0700 Subject: od: -wN, N>64K, avoid misbehavior on systems with 32-bit size_t * src/od.c (PRINT_FIELDS): Declare "i" to be of type uintmax_t, so that the numerator in the expression for "next_pad" does not overflow. (print_named_ascii): Likewise. (print_ascii): Likewise. Bug introduced via commit v6.12-42-g20c0b87. * tests/misc/od.pl: Exercise each of the three affected code paths. * NEWS (Bug fixes): Mention it. Reported by Rich Burridge. --- NEWS | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 721e05bf5..cad5eee38 100644 --- a/NEWS +++ b/NEWS @@ -18,6 +18,10 @@ GNU coreutils NEWS -*- outline -*- system such as GNU/Linux where directory ACL umasks override process umasks. [bug introduced in coreutils-6.0] + od -wN with N larger than 64K on a system with 32-bit size_t would + print approximately 2*N bytes of extraneous padding. + [Bug introduced in coreutils-7.0] + tail --retry -f now waits for the files specified to appear. Before, tail would immediately exit when such a file is inaccessible during the initial open. -- cgit v1.2.3-54-g00ecf