]> git.ipfire.org Git - thirdparty/coreutils.git/commit
ptx: avoid infloop due to zero-length matches with -S regex
authorBernhard Voelker <mail@bernhard-voelker.de>
Wed, 13 Sep 2017 21:37:20 +0000 (23:37 +0200)
committerBernhard Voelker <mail@bernhard-voelker.de>
Thu, 14 Sep 2017 05:50:27 +0000 (07:50 +0200)
commit97c5045435f15c2bc984cc05bbfdca897bbdd284
tree973fcb938eb53e5e865d3148ad34cbc4f3601f2c
parent5d9d07bbb1dbadd9d445b093e3a0d8247119860e
ptx: avoid infloop due to zero-length matches with -S regex

* src/ptx.c (find_occurs_in_text): Die with an appropriate error
diagnostic when the given regular expression returns a match of
length 0.
* tests/misc/ptx.pl (S-infloop): Add a test.
* NEWS (Bug fixes): Mention the fix.

Fixes https://bugs.gnu.org/28417 which was detected using
Symbolic Execution techniques developed in the course of the
SYMBIOSYS research project at COMSYS, RWTH Aachen University.
NEWS
src/ptx.c
tests/misc/ptx.pl