diff options
author | Bernhard Voelker <mail@bernhard-voelker.de> | 2012-11-18 22:20:16 +0100 |
---|---|---|
committer | Bernhard Voelker <mail@bernhard-voelker.de> | 2012-11-19 00:08:38 +0100 |
commit | 1482f730b47d1abad3d75199dde5237d9bf16a4a (patch) | |
tree | 857b97da89b2fd93bfe304ad530f104bd42aec21 /NEWS | |
parent | 6a5843d92fca254f0b27c3fee88a11840034ce32 (diff) | |
download | coreutils-1482f730b47d1abad3d75199dde5237d9bf16a4a.tar.xz |
cut: do not accept the invalid range 0-
The command "echo 12345 | cut -b 0-" prints an empty line while
it should fail with "fields and positions are numbered from 1".
* src/cut.c (set_fields): Add a diagnostic for the invalid open
range which starts with Zero, i.e., the range 0-.
* tests/misc/cut.pl: Add tests to ensure the range 0- fails for
fields (-f) and for positions (-b, -c).
* NEWS: Mention the fix.
Reported by Marcel Böhme in <http://bugs.gnu.org/12903>.
Diffstat (limited to 'NEWS')
-rw-r--r-- | NEWS | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -10,6 +10,10 @@ GNU coreutils NEWS -*- outline -*- ** Bug fixes + cut no longer accepts the invalid range 0-, which made it print empty lines. + Instead, cut now fails and emits an appropriate diagnostic. + [This bug was present in "the beginning".] + pr -n no longer crashes when passed values >= 32. Also line numbers are consistently padded with spaces, rather than with zeros for certain widths. [bug introduced in TEXTUTILS-1_22i] |