* regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 5 Jun 2006 05:21:20 +0000 (05:21 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 5 Jun 2006 05:21:20 +0000 (05:21 +0000)
reported by Andreas Schwab.

lib/ChangeLog
lib/regexec.c

index 453a08de5dd0cee952bd1b7333e05fb9b2ba6526..cca7be86ccfdcdce7e2b641547e8e88a5a40f03a 100644 (file)
@@ -1,3 +1,8 @@
+2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
+       reported by Andreas Schwab.
+
 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
             Bruno Haible  <bruno@clisp.org>
 
index 6307d0501aba84a40a0fc1409b43e8b05e699249..84c3aed634997347fd6c121ae9d2918832f2cb9a 100644 (file)
@@ -1,5 +1,5 @@
 /* Extended regular expression matching and search library.
-   Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
 
@@ -3615,7 +3615,7 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
       else if (type == OP_UTF8_PERIOD)
         {
          if (ASCII_CHARS % BITSET_WORD_BITS == 0)
-           memset (accepts, -1, ASCII_CHARS);
+           memset (accepts, -1, ASCII_CHARS / CHAR_BIT);
          else
            bitset_merge (accepts, utf8_sb_map);
          if (!(dfa->syntax & RE_DOT_NEWLINE))