[Midnightbsd-cvs] src [8824] trunk/usr.bin/grep/regex/tre-fastmatch.c: strengthen the check in IS_OUT_OF_BOUNDS
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sun Sep 25 23:44:38 EDT 2016
Revision: 8824
http://svnweb.midnightbsd.org/src/?rev=8824
Author: laffer1
Date: 2016-09-25 23:44:37 -0400 (Sun, 25 Sep 2016)
Log Message:
-----------
strengthen the check in IS_OUT_OF_BOUNDS
Modified Paths:
--------------
trunk/usr.bin/grep/regex/tre-fastmatch.c
Modified: trunk/usr.bin/grep/regex/tre-fastmatch.c
===================================================================
--- trunk/usr.bin/grep/regex/tre-fastmatch.c 2016-09-26 03:44:09 UTC (rev 8823)
+++ trunk/usr.bin/grep/regex/tre-fastmatch.c 2016-09-26 03:44:37 UTC (rev 8824)
@@ -103,7 +103,7 @@
((!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
More information about the Midnightbsd-cvs
mailing list