grep-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

grep branch, master, updated. v2.6.3-63-ge0ac660


From: Jim Meyering
Subject: grep branch, master, updated. v2.6.3-63-ge0ac660
Date: Wed, 05 May 2010 08:10:37 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  e0ac660a2c1c1484baeb27716d7aeb37431b4ca3 (commit)
      from  d748294c5645e9e1afb48da004ecabab1a44cfc5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=e0ac660a2c1c1484baeb27716d7aeb37431b4ca3


commit e0ac660a2c1c1484baeb27716d7aeb37431b4ca3
Author: Jim Meyering <address@hidden>
Date:   Wed May 5 10:09:47 2010 +0200

    dfa: avoid segfault when processing an invalid multi-byte sequence
    
    * src/dfa.c (dfaexec): Handle the cases in which mbrtowc returns
    (size_t)-1 or (size_t)-2, rather than setting mblen_buf[i] to an
    outrageously large value.

diff --git a/src/dfa.c b/src/dfa.c
index 131449c..afcb55b 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -3119,6 +3119,8 @@ prepare_wc_buf (const char *begin, const char *end)
           remain_bytes
             = mbrtowc(inputwcs + i, begin + i, end - begin - i + 1, &mbs);
           if (remain_bytes < 1
+              || remain_bytes == (size_t) -1
+              || remain_bytes == (size_t) -2
               || (remain_bytes == 1 && inputwcs[i] == (wchar_t)begin[i]))
             {
               remain_bytes = 0;

-----------------------------------------------------------------------

Summary of changes:
 src/dfa.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
grep




reply via email to

[Prev in Thread] Current Thread [Next in Thread]