diff options
author | Corinna Vinschen <vinschen@redhat.com> | 2013-08-16 20:50:12 +0200 |
---|---|---|
committer | Jim Meyering <meyering@fb.com> | 2013-09-01 08:20:04 -0700 |
commit | bd58cfd715ae24de75103522e7af75c1909da0f1 (patch) | |
tree | 58c19cd7f89f820f98cad7da4deeee56ecee46b9 /NEWS | |
parent | 12edf2b2f25673204267e8f742c76328efc877db (diff) | |
download | grep-bd58cfd715ae24de75103522e7af75c1909da0f1.tar.gz |
fix Cygwin UTF-16 surrogate-pair handling with -i
grep -i would segfault on systems using UTF-16-based wchar_t (Cygwin)
when converting an input string containing certain 4-byte UTF-8
sequences to lower case. The conversions to wchar_t and back to
a UTF-8 multibyte string did not take surrogate pairs into account.
* src/searchutils.c (mbtolower) [__CYGWIN__]: Detect and handle
surrogate pairs when converting.
* NEWS (Bug fixes): Mention it.
* tests/surrogate-pair: New test.
* tests/Makefile.am (TESTS): Add it.
Reported by: Jim Burwell
Diffstat (limited to 'NEWS')
-rw-r--r-- | NEWS | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -4,6 +4,12 @@ GNU grep NEWS -*- outline -*- ** Bug fixes + grep -i would segfault on systems using UTF-16-based wchar_t (Cygwin) + when converting an input string containing certain 4-byte UTF-8 + sequences to lower case. The conversions to wchar_t and back to + a UTF-8 multibyte string did not take surrogate pairs into account. + [bug present since at least grep-2.6, though the segfault is new with 2.13] + grep -E would segfault when given a regexp like '([^.]*[M]){1,2}' for any multibyte character M. [bug introduced in grep-2.6, which would segfault, but 2.7 and 2.8 had no problem, and 2.9 through 2.14 would |