Date: Sun, 17 Feb 2013 19:48:24 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r246917 - head/usr.bin/grep/regex Message-ID: <201302171948.r1HJmOJ5051643@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Sun Feb 17 19:48:23 2013 New Revision: 246917 URL: http://svnweb.freebsd.org/changeset/base/246917 Log: 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 Modified: head/usr.bin/grep/regex/tre-fastmatch.c Modified: head/usr.bin/grep/regex/tre-fastmatch.c ============================================================================== --- head/usr.bin/grep/regex/tre-fastmatch.c Sun Feb 17 18:42:30 2013 (r246916) +++ head/usr.bin/grep/regex/tre-fastmatch.c Sun Feb 17 19:48:23 2013 (r246917) @@ -103,7 +103,7 @@ static int fastcmp(const fastmatch_t *fg ((!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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302171948.r1HJmOJ5051643>