From: Paul Eggert Date: Tue, 12 Jun 2007 17:44:37 +0000 (+0000) Subject: * m4/regex.m4 (gl_REGEX): Catch a bug with [[:alnum:]_-] reported by X-Git-Tag: cvs-readonly~243 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=e5a6714d02ac3db96ffd12e1bc9634aeedcc657d;p=gnulib.git * m4/regex.m4 (gl_REGEX): Catch a bug with [[:alnum:]_-] reported by Vin Shelton. --- diff --git a/ChangeLog b/ChangeLog index 6287f40a6..5c9f92286 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-06-12 Paul Eggert + + * m4/regex.m4 (gl_REGEX): Catch a bug with [[:alnum:]_-] reported by + Vin Shelton. + 2007-06-11 Bruno Haible * lib/printf-args.c (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Fix NULL diff --git a/m4/regex.m4 b/m4/regex.m4 index c064298dc..bde74ea5e 100644 --- a/m4/regex.m4 +++ b/m4/regex.m4 @@ -1,4 +1,4 @@ -#serial 46 +#serial 47 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007 Free Software Foundation, Inc. @@ -137,6 +137,17 @@ AC_DEFUN([gl_REGEX], if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0) return 1; + /* Catch a bug reported by Vin Shelton in + http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html + */ + re_set_syntax (RE_SYNTAX_POSIX_BASIC + & ~RE_CONTEXT_INVALID_DUP + & ~RE_NO_EMPTY_RANGES); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, ®ex); + if (s) + return 1; + /* REG_STARTEND was added to glibc on 2004-01-15. Reject older versions. */ if (! REG_STARTEND)