Date: Tue, 20 Sep 2011 21:53:47 +0000 (UTC) From: Gabor Kovesdan <gabor@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r225701 - user/gabor/tre-integration/contrib/tre/lib Message-ID: <201109202153.p8KLrlj9046182@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: gabor Date: Tue Sep 20 21:53:46 2011 New Revision: 225701 URL: http://svn.freebsd.org/changeset/base/225701 Log: - Remove a not very necessary sanity check and rely on the offets when REG_STARTEND is set. It is better to let the program segfault than hiding hard to find bugs. Modified: user/gabor/tre-integration/contrib/tre/lib/tre-internal.h Modified: user/gabor/tre-integration/contrib/tre/lib/tre-internal.h ============================================================================== --- user/gabor/tre-integration/contrib/tre/lib/tre-internal.h Tue Sep 20 21:53:26 2011 (r225700) +++ user/gabor/tre-integration/contrib/tre/lib/tre-internal.h Tue Sep 20 21:53:46 2011 (r225701) @@ -265,8 +265,6 @@ struct tnfa { size_t offset = pmatch[0].rm_so; \ int ret; \ \ - if ((len != (unsigned)-1) && (pmatch[0].rm_eo > len)) \ - return REG_NOMATCH; \ if ((long long)pmatch[0].rm_eo - pmatch[0].rm_so < 0) \ return REG_NOMATCH; \ ret = fn; \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201109202153.p8KLrlj9046182>