about summary refs log tree commit diff
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
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.
-rw-r--r--ChangeLog6
-rw-r--r--posix/regcomp.c4
-rw-r--r--posix/rxspencer/tests5
-rw-r--r--sysdeps/unix/sysv/linux/ifaddrs.c4
4 files changed, 16 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index c9c0f161ba..67e6996926 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
 
 	* sysdeps/unix/sysv/linux/ifaddrs.c: Determine sin6_scope_id field
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,-
diff --git a/sysdeps/unix/sysv/linux/ifaddrs.c b/sysdeps/unix/sysv/linux/ifaddrs.c
index 77f6159bf6..8a052e212d 100644
--- a/sysdeps/unix/sysv/linux/ifaddrs.c
+++ b/sysdeps/unix/sysv/linux/ifaddrs.c
@@ -610,8 +610,8 @@ getifaddrs (struct ifaddrs **ifap)
 			    {
 			      memcpy (&ifas[ifa_index].addr.s6.sin6_addr,
 				      rta_data, rta_payload);
-			      if (IN6_IS_ADDR_LINKLOCAL (rta_data) ||
-				  IN6_IS_ADDR_MC_LINKLOCAL (rta_data))
+			      if (IN6_IS_ADDR_LINKLOCAL (rta_data)
+				  || IN6_IS_ADDR_MC_LINKLOCAL (rta_data))
 				ifas[ifa_index].addr.s6.sin6_scope_id =
 				  ifam->ifa_index;
 			    }