fix regexp bug in checking too far for regmust
svn: r4460
This commit is contained in:
parent
57f3a709d1
commit
029659c1d5
|
@ -2315,10 +2315,10 @@ regexec(const char *who,
|
|||
|
||||
if ((spos - stringpos) + l <= stringlen) {
|
||||
if (prog->flags & REGEXP_MUST_CI)
|
||||
pos = l_strchr_ci(string, spos, stringlen - (l - 1),
|
||||
pos = l_strchr_ci(string, spos, stringlen - (spos - stringpos) - (l - 1),
|
||||
(ITO(prog->program, (char *)prog) XFORM_OK_PLUS prog->regmust)[0]);
|
||||
else
|
||||
pos = l_strchr(string, spos, stringlen - (l - 1),
|
||||
pos = l_strchr(string, spos, stringlen - (spos - stringpos) - (l - 1),
|
||||
(ITO(prog->program, (char *)prog) XFORM_OK_PLUS prog->regmust)[0]);
|
||||
if (pos == -1)
|
||||
return 0; /* Not present. */
|
||||
|
|
Loading…
Reference in New Issue
Block a user