Mercurial > gnulib
changeset 37898:1949d83abae5
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 [.
* lib/regcomp.c (build_range_exp, build_charclass_op)
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Mon, 18 Jan 2016 10:32:26 -0800 |
parents | 04353adc4fee |
children | 67ef6269251b |
files | ChangeLog lib/regcomp.c |
diffstat | 2 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Jan 18 10:31:07 2016 -0800 +++ b/ChangeLog Mon Jan 18 10:32:26 2016 -0800 @@ -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.
--- a/lib/regcomp.c Mon Jan 18 10:31:07 2016 -0800 +++ b/lib/regcomp.c Mon Jan 18 10:32:26 2016 -0800 @@ -153,9 +153,9 @@ 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 \\(")