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
This commit is contained in:
Mark Johnston 2013-02-17 19:48:23 +00:00
parent a937c5078f
commit 43e1adfa05
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=246917

View File

@ -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