summary refs log tree commit diff
path: root/posix/regcomp.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2010-01-15 12:03:16 -0800
committerUlrich Drepper <drepper@redhat.com>2010-01-15 12:03:16 -0800
commit2da42bc06566bc89785e580fa1ac89b4c9f2a63c (patch)
tree9a0897c4f719fa624a8ee764b8c82affbfed772d /posix/regcomp.c
parent635bc2a20f0070a8d30bc9a49598c3e2726a33b5 (diff)
downloadglibc-2da42bc06566bc89785e580fa1ac89b4c9f2a63c.tar.gz
glibc-2da42bc06566bc89785e580fa1ac89b4c9f2a63c.tar.xz
glibc-2da42bc06566bc89785e580fa1ac89b4c9f2a63c.zip
Fix a few more cases of ignored return values in regex.
Diffstat (limited to 'posix/regcomp.c')
-rw-r--r--posix/regcomp.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/posix/regcomp.c b/posix/regcomp.c
index 542b848f14..63ef7683ca 100644
--- a/posix/regcomp.c
+++ b/posix/regcomp.c
@@ -999,7 +999,11 @@ create_initial_state (re_dfa_t *dfa)
 	    int dest_idx = dfa->edests[node_idx].elems[0];
 	    if (!re_node_set_contains (&init_nodes, dest_idx))
 	      {
-		re_node_set_merge (&init_nodes, dfa->eclosures + dest_idx);
+		reg_errcode_t err = re_node_set_merge (&init_nodes,
+						       dfa->eclosures
+						       + dest_idx);
+		if (err != REG_NOERROR)
+		  return err;
 		i = 0;
 	      }
 	  }
@@ -1414,7 +1418,7 @@ link_nfa_nodes (void *extra, bin_tree_t *node)
     case OP_BACK_REF:
       dfa->nexts[idx] = node->next->node_idx;
       if (node->token.type == OP_BACK_REF)
-	re_node_set_init_1 (dfa->edests + idx, dfa->nexts[idx]);
+	err = re_node_set_init_1 (dfa->edests + idx, dfa->nexts[idx]);
       break;
 
     default:
@@ -1690,7 +1694,9 @@ calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, int node, int root)
 	else
 	  eclosure_elem = dfa->eclosures[edest];
 	/* Merge the epsilon closure of `edest'.  */
-	re_node_set_merge (&eclosure, &eclosure_elem);
+	err = re_node_set_merge (&eclosure, &eclosure_elem);
+	if (BE (err != REG_NOERROR, 0))
+	  return err;
 	/* If the epsilon closure of `edest' is incomplete,
 	   the epsilon closure of this node is also incomplete.  */
 	if (dfa->eclosures[edest].nelem == 0)