svn commit: r225715 - user/gabor/grep/trunk/regex
Gabor Kovesdan
gabor at FreeBSD.org
Wed Sep 21 13:22:36 UTC 2011
Author: gabor
Date: Wed Sep 21 13:22:36 2011
New Revision: 225715
URL: http://svn.freebsd.org/changeset/base/225715
Log:
- Do not allow trailing escape
Modified:
user/gabor/grep/trunk/regex/tre-fastmatch.c
Modified: user/gabor/grep/trunk/regex/tre-fastmatch.c
==============================================================================
--- user/gabor/grep/trunk/regex/tre-fastmatch.c Wed Sep 21 13:19:45 2011 (r225714)
+++ user/gabor/grep/trunk/regex/tre-fastmatch.c Wed Sep 21 13:22:36 2011 (r225715)
@@ -599,6 +599,8 @@ tre_compile_fast(fastmatch_t *fg, const
case TRE_CHAR('\\'):
if (escaped)
STORE_CHAR;
+ else if (i == n - 1)
+ goto badpat;
else
escaped = true;
continue;
More information about the svn-src-user
mailing list