]> Savannah Git Hosting - gnulib.git/commitdiff
regex: fix [ diagnostic
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 18 Jan 2016 18:32:26 +0000 (10:32 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 18 Jan 2016 18:38:35 +0000 (10:38 -0800)
Problem and fix reported by Aharon Robbins in:
http://lists.gnu.org/archive/html/bug-gnulib/2016-01/msg00082.html
* lib/regcomp.c (REG_EBRACK_IDX): Fix misleading diagnostic about [.

* lib/regcomp.c (build_range_exp, build_charclass_op)

ChangeLog
lib/regcomp.c

index ecb07463b1f7cf35169749b53d7c7627fa43ba59..d4779a12a0790095540efba163243036de819d35 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,14 @@
 2016-01-18  Paul Eggert  <eggert@cs.ucla.edu>
 
+       regex: fix [ diagnostic
+       Problem and fix reported by Aharon Robbins in:
+       http://lists.gnu.org/archive/html/bug-gnulib/2016-01/msg00082.html
+       * lib/regcomp.c (REG_EBRACK_IDX): Fix misleading diagnostic about [.
+
        regex: fix memory leaks
        Problem and draft fix reported by Aharon Robbins in:
        http://lists.gnu.org/archive/html/bug-gnulib/2016-01/msg00082.html
-       * lib/regcomp.c (build_range_exp, build_charclass_op):
+       * lib/regcomp.c (build_range_exp, build_charclass_op)
        * lib/regex_internal.c (re_dfa_add_node):
        Fix memory leak on failure.
 
index 0369f26f81f51c7769d5e33528e5f280819bc26c..1eda11009de10437ef9652917304a8b8569612bb 100644 (file)
@@ -153,9 +153,9 @@ static const char __re_error_msgid[] =
     gettext_noop ("Invalid back reference") /* REG_ESUBREG */
     "\0"
 #define REG_EBRACK_IDX (REG_ESUBREG_IDX + sizeof "Invalid back reference")
-    gettext_noop ("Unmatched [ or [^") /* REG_EBRACK */
+    gettext_noop ("Unmatched [, [^, [:, [., or [=")    /* REG_EBRACK */
     "\0"
-#define REG_EPAREN_IDX (REG_EBRACK_IDX + sizeof "Unmatched [ or [^")
+#define REG_EPAREN_IDX (REG_EBRACK_IDX + sizeof "Unmatched [, [^, [:, [., or [=")
     gettext_noop ("Unmatched ( or \\(") /* REG_EPAREN */
     "\0"
 #define REG_EBRACE_IDX (REG_EPAREN_IDX + sizeof "Unmatched ( or \\(")