diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | regexec.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2013-12-19 Arnold D. Robbins <arnold@skeeve.com> + + * regexec.c (re_search_internal): Make sure `dfa' pointer is + not NULL before trying to dereference it. + 2013-12-16 Arnold D. Robbins <arnold@skeeve.com> * configure.ac (AC_FUNC_VPRINTF): Remove. Not needed on current @@ -664,7 +664,7 @@ re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch, nmatch -= extra_nmatch; /* Check if the DFA haven't been compiled. */ - if (BE (preg->used == 0 || dfa->init_state == NULL + if (BE (preg->used == 0 || dfa == NULL || dfa->init_state == NULL || dfa->init_state_word == NULL || dfa->init_state_nl == NULL || dfa->init_state_begbuf == NULL, 0)) return REG_NOMATCH; |