cut: fix a segfault with disjoint open ended ranges
commitbe7932e863de07c4c7e4fc3c1db3eb6d04ba9af5
authorPádraig Brady <P@draigBrady.com>
Mon, 4 Feb 2013 11:39:20 +0000 (4 11:39 +0000)
committerPádraig Brady <P@draigBrady.com>
Mon, 4 Feb 2013 13:55:01 +0000 (4 13:55 +0000)
tree46160fbc21278846454f9264d82ca0d505099658
parentd57ebc45ba4c59cc6f8bb0e9a435ecbddc84b982
cut: fix a segfault with disjoint open ended ranges

Fixes the issue introduced in unreleased commit v8.20-60-gec48bea.

* src/cut.c (set_fields): Don't access the bit array if
we've an open ended range that's outside any finite range.
* tests/misc/cut.pl: Add tests for this case.
Reported by Marcel Böhme in http://bugs.gnu.org/13627
src/cut.c
tests/misc/cut.pl