summaryrefslogtreecommitdiff
path: root/NEWS
diff options
context:
space:
mode:
authorJim Meyering <meyering@fb.com>2013-05-27 19:54:55 -0700
committerJim Meyering <meyering@fb.com>2013-05-28 21:46:41 -0700
commit3f9248e93e98b4550e716813b3e64433b716429f (patch)
treed9c085641847efd46ade3e0622b1648503efce41 /NEWS
parentee61a9397d1e68920247547abedfeef194931fd3 (diff)
downloadgrep-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--NEWS4
1 files changed, 4 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 5dc0a8c2..407e0b01 100644
--- a/NEWS
+++ b/NEWS
@@ -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