aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--regexec.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 7a0e6da8..6f81613a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/regexec.c b/regexec.c
index a39e1f58..77795f69 100644
--- a/regexec.c
+++ b/regexec.c
@@ -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;