diff options
author | Jim Meyering <meyering@fb.com> | 2013-05-27 19:54:55 -0700 |
---|---|---|
committer | Jim Meyering <meyering@fb.com> | 2013-05-28 21:46:41 -0700 |
commit | 3f9248e93e98b4550e716813b3e64433b716429f (patch) | |
tree | d9c085641847efd46ade3e0622b1648503efce41 /NEWS | |
parent | ee61a9397d1e68920247547abedfeef194931fd3 (diff) | |
download | grep-3f9248e93e98b4550e716813b3e64433b716429f.tar.gz |
grep -F: avoid an infinite loop with invalid multi-byte search string
* src/kwsearch.c (Fexecute): Avoid an infinite loop when processing
a fixed (-F) multibyte search string that is an invalid byte sequence
in the current locale and that matches the bytes of the input twice
on a line. Reported by Daisuke GOTO in
http://thread.gmane.org/gmane.comp.gnu.grep.bugs/4773
* tests/invalid-multibyte-infloop: New test.
* tests/Makefile.am (TESTS): Add it.
* NEWS (Bug fixes): Mention it.
Diffstat (limited to 'NEWS')
-rw-r--r-- | NEWS | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -4,6 +4,10 @@ GNU grep NEWS -*- outline -*- ** Bug fixes + grep -F would get stuck in an infinite loop when given a search string + that is an invalid byte sequence in the current locale and that matches + the bytes of the input twice on a line. Now grep fails with exit status 1. + grep -P could misbehave. While multi-byte mode is only supported by PCRE with UTF-8 locales, grep did not activate it. This would cause failures to match multibyte characters against some regular expressions, especially |