about summary refs log tree commit diff
path: root/posix/regcomp.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-11-10 00:50:40 +0000
committerUlrich Drepper <drepper@redhat.com>2004-11-10 00:50:40 +0000
commitb4ae56bdc8cdb6cd8a6650d4dabfc37df1005087 (patch)
tree40464e84e8dd9548ac42f53c9fc0ea1699905a28 /posix/regcomp.c
parente00a2302820a3ef3565ceeb4c5990e0fe977f348 (diff)
downloadglibc-b4ae56bdc8cdb6cd8a6650d4dabfc37df1005087.tar.gz
glibc-b4ae56bdc8cdb6cd8a6650d4dabfc37df1005087.tar.xz
glibc-b4ae56bdc8cdb6cd8a6650d4dabfc37df1005087.zip
Update.
2004-11-09  Jakub Jelinek  <jakub@redhat.com>

	* 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.
Diffstat (limited to 'posix/regcomp.c')
-rw-r--r--posix/regcomp.c4
1 files changed, 3 insertions, 1 deletions
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;