diff options
author | Mark Johnston <markj@FreeBSD.org> | 2013-02-17 19:48:23 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2013-02-17 19:48:23 +0000 |
commit | 43e1adfa058948faea5664afc3abfdfdf902408d (patch) | |
tree | f1a332eba30376103d0db9853b683b453c0b18eb /usr.bin/grep/regex | |
parent | a937c5078f846614248794a0f01f02aa012d21b5 (diff) | |
download | src-43e1adfa058948faea5664afc3abfdfdf902408d.tar.gz src-43e1adfa058948faea5664afc3abfdfdf902408d.zip |
Strengthen the check in IS_OUT_OF_BOUNDS to ensure that (j - 1) is a
valid index into the input buffer.
PR: bin/175213
Reviewed by: gabor
Approved by: emaste (co-mentor)
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=246917
Diffstat (limited to 'usr.bin/grep/regex')
-rw-r--r-- | usr.bin/grep/regex/tre-fastmatch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/grep/regex/tre-fastmatch.c b/usr.bin/grep/regex/tre-fastmatch.c index b7a7c91fbcfd..640ee3d6344d 100644 --- a/usr.bin/grep/regex/tre-fastmatch.c +++ b/usr.bin/grep/regex/tre-fastmatch.c @@ -103,7 +103,7 @@ static int fastcmp(const fastmatch_t *fg, const void *data, ((!fg->reversed \ ? ((type == STR_WIDE) ? ((j + fg->wlen) > len) \ : ((j + fg->len) > len)) \ - : (j < 0))) + : (j <= 0))) /* * Checks whether the new position after shifting in the input string |