From b4ae56bdc8cdb6cd8a6650d4dabfc37df1005087 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 10 Nov 2004 00:50:40 +0000 Subject: Update. 2004-11-09 Jakub Jelinek * posix/regcomp.c (calc_eclosure_iter): Don't access dfa->edests[node].elems[0] if dfa->edests[node].nelem == 0. * posix/rxspencer/tests: Add 5 new tests. --- posix/regcomp.c | 4 +++- posix/rxspencer/tests | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'posix') diff --git a/posix/regcomp.c b/posix/regcomp.c index bdd616dfbb..ba7a1cc5d4 100644 --- a/posix/regcomp.c +++ b/posix/regcomp.c @@ -1602,7 +1602,9 @@ calc_eclosure_iter (new_set, dfa, node, root) ? dfa->nodes[node].opr.ctx_type : 0); /* If the current node has constraints, duplicate all nodes. Since they must inherit the constraints. */ - if (constraint && !dfa->nodes[dfa->edests[node].elems[0]].duplicated) + if (constraint + && dfa->edests[node].nelem + && !dfa->nodes[dfa->edests[node].elems[0]].duplicated) { int org_node, cur_node; org_node = cur_node = node; diff --git a/posix/rxspencer/tests b/posix/rxspencer/tests index f4a3fb3df5..30fff15946 100644 --- a/posix/rxspencer/tests +++ b/posix/rxspencer/tests @@ -505,3 +505,8 @@ Char \([a-z0-9_]*\)\[.* b Char xyz[k Char xyz[k xyz a?b - ab ab -\{0,1\}[0-9]*$ b -5 -5 a*a*a*a*a*a*a* & aaaaaa aaaaaa +(\b){0} - x @x - +\(\b\)\{0,0\} b abc @abc - +a(\b){0}c - ac ac - +a(.*)b(\0){0}c - abc abc @bc,- +a(.*)b(\0){0}c - axbc axbc x,- -- cgit v1.2.3-59-g8ed1b