summaryrefslogtreecommitdiffstats
path: root/lib/libc/regex/engine.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/regex/engine.c')
-rw-r--r--lib/libc/regex/engine.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/regex/engine.c b/lib/libc/regex/engine.c
index 8fc67ce..436370d 100644
--- a/lib/libc/regex/engine.c
+++ b/lib/libc/regex/engine.c
@@ -244,7 +244,7 @@ matcher(struct re_guts *g,
ZAPSTATE(&m->mbs);
/* Adjust start according to moffset, to speed things up */
- if (g->moffset > -1)
+ if (dp != NULL && g->moffset > -1)
start = ((dp - g->moffset) < start) ? start : dp - g->moffset;
SP("mloop", m->st, *start);
OpenPOWER on IntegriCloud