Prevent NULL pointer de-reference.
As a follow up to r279090, if dp hasn't been defined, we shouldn't attempt to do an optimization here.
This commit is contained in:
parent
4c25bba76f
commit
cc3a001f1c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=279104
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user