summaryrefslogtreecommitdiffstats
path: root/gl/regexec.c
diff options
context:
space:
mode:
Diffstat (limited to 'gl/regexec.c')
-rw-r--r--gl/regexec.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/gl/regexec.c b/gl/regexec.c
index ac6c258..5452ef7 100644
--- a/gl/regexec.c
+++ b/gl/regexec.c
@@ -1,6 +1,6 @@
1/* Extended regular expression matching and search library. 1/* Extended regular expression matching and search library.
2 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, 2 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
3 Inc. 3 Free Software Foundation, Inc.
4 This file is part of the GNU C Library. 4 This file is part of the GNU C Library.
5 Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. 5 Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
6 6
@@ -701,7 +701,8 @@ re_search_internal (const regex_t *preg,
701 fl_longest_match = (nmatch != 0 || dfa->nbackref); 701 fl_longest_match = (nmatch != 0 || dfa->nbackref);
702 702
703 err = re_string_allocate (&mctx.input, string, length, dfa->nodes_len + 1, 703 err = re_string_allocate (&mctx.input, string, length, dfa->nodes_len + 1,
704 preg->translate, preg->syntax & RE_ICASE, dfa); 704 preg->translate, (preg->syntax & RE_ICASE) != 0,
705 dfa);
705 if (BE (err != REG_NOERROR, 0)) 706 if (BE (err != REG_NOERROR, 0))
706 goto free_return; 707 goto free_return;
707 mctx.input.stop = stop; 708 mctx.input.stop = stop;
@@ -1044,6 +1045,11 @@ prune_impossible_nodes (re_match_context_t *mctx)
1044 re_node_set_free (&sctx.limits); 1045 re_node_set_free (&sctx.limits);
1045 if (BE (ret != REG_NOERROR, 0)) 1046 if (BE (ret != REG_NOERROR, 0))
1046 goto free_return; 1047 goto free_return;
1048 if (sifted_states[0] == NULL)
1049 {
1050 ret = REG_NOMATCH;
1051 goto free_return;
1052 }
1047 } 1053 }
1048 re_free (mctx->state_log); 1054 re_free (mctx->state_log);
1049 mctx->state_log = sifted_states; 1055 mctx->state_log = sifted_states;
@@ -3078,7 +3084,9 @@ check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx,
3078 const re_dfa_t *const dfa = mctx->dfa; 3084 const re_dfa_t *const dfa = mctx->dfa;
3079 bool ok; 3085 bool ok;
3080 Idx cur_idx; 3086 Idx cur_idx;
3087#ifdef RE_ENABLE_I18N
3081 reg_errcode_t err = REG_NOERROR; 3088 reg_errcode_t err = REG_NOERROR;
3089#endif
3082 re_node_set union_set; 3090 re_node_set union_set;
3083 re_node_set_init_empty (&union_set); 3091 re_node_set_init_empty (&union_set);
3084 for (cur_idx = 0; cur_idx < cur_nodes->nelem; ++cur_idx) 3092 for (cur_idx = 0; cur_idx < cur_nodes->nelem; ++cur_idx)
@@ -3467,7 +3475,7 @@ out_free:
3467 CONTEXT_NEWLINE); 3475 CONTEXT_NEWLINE);
3468 if (BE (dest_states_nl[i] == NULL && err != REG_NOERROR, 0)) 3476 if (BE (dest_states_nl[i] == NULL && err != REG_NOERROR, 0))
3469 goto out_free; 3477 goto out_free;
3470 } 3478 }
3471 else 3479 else
3472 { 3480 {
3473 dest_states_word[i] = dest_states[i]; 3481 dest_states_word[i] = dest_states[i];