]> git.ipfire.org Git - thirdparty/coreutils.git/commit
od: -wN, N>64K, avoid misbehavior on systems with 32-bit size_t
authorJim Meyering <meyering@fb.com>
Sun, 2 Jun 2013 02:20:06 +0000 (19:20 -0700)
committerJim Meyering <meyering@fb.com>
Sun, 2 Jun 2013 16:25:38 +0000 (09:25 -0700)
commit51a8f707131c36d7a88753e3bee839b2a4a336e4
treef8aab34122568f6d1ca476d9d469e4d01125c77e
parentaeaeb87c134ce748527ba99e749b7369fcba2438
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
THANKS.in
src/od.c
tests/misc/od.pl