- Prevent false matches when DFA is disabled (bug #138558).
This commit is contained in:
parent
553606aabf
commit
acd16e9f79
@ -1,5 +1,5 @@
|
||||
--- grep-2.5.1/src/search.c.dfa-optional 2004-11-07 20:04:26.181494244 +0000
|
||||
+++ grep-2.5.1/src/search.c 2004-11-07 20:11:07.437866925 +0000
|
||||
--- grep-2.5.1/src/search.c 2004-11-07 20:11:07.437866925 +0000
|
||||
+++ grep-2.5.1/src/search.c 2004-11-10 09:40:44.994750111 +0000
|
||||
@@ -305,11 +305,33 @@
|
||||
int backref, start, len;
|
||||
struct kwsmatch kwsm;
|
||||
@ -55,6 +55,15 @@
|
||||
if (offset == (size_t) -1)
|
||||
break;
|
||||
/* Narrow down to the line we've found. */
|
||||
@@ -416,7 +441,7 @@
|
||||
--beg;
|
||||
}
|
||||
/* Successful, no backreferences encountered! */
|
||||
- if (!backref)
|
||||
+ if (use_dfa && !backref)
|
||||
goto success_in_beg_and_end;
|
||||
}
|
||||
else
|
||||
@@ -450,7 +475,11 @@
|
||||
if ((start == 0 || !WCHAR ((unsigned char) beg[start - 1]))
|
||||
&& (len == end - beg - 1
|
||||
|
@ -83,6 +83,9 @@ fi
|
||||
%{_mandir}/*/*
|
||||
|
||||
%changelog
|
||||
* Wed Nov 10 2004 Tim Waugh <twaugh@redhat.com>
|
||||
- Prevent false matches when DFA is disabled (bug #138558).
|
||||
|
||||
* Mon Nov 8 2004 Tim Waugh <twaugh@redhat.com> 2.5.1-36
|
||||
- Automatically disable DFA when processing multibyte input. GREP_USE_DFA
|
||||
environment variable overrides.
|
||||
|
Loading…
Reference in New Issue
Block a user