Commit Graph

77 Commits

Author SHA1 Message Date
afc4229234 Fix recursive expressions where the recursion appears more than once.
Fixes https://github.com/boostorg/regex/issues/87.
Also fix some more msvc warnings.
2020-01-23 19:24:33 +00:00
bc160a58f0 Merge branch 'develop' into git_issue_80
Fixed Conflicts:
	include/boost/regex/v4/basic_regex_creator.hpp
	include/boost/regex/v4/basic_regex_parser.hpp
2020-01-21 12:57:09 +00:00
2cd947f7c4 Suppress msvc warnings.
Fixes: https://github.com/boostorg/regex/issues/80
2020-01-20 19:51:46 +00:00
deb9104ceb Fix gcc warning. 2020-01-19 17:19:54 +00:00
4bb4d392e4 Remove limit on the number of backrefs possible.
Changes named sub-expressions to use different hashing scheme: high order bit is now always set to clashes between hashes and indexes don't happen until 2^30 or 2^62 sub-expressions in 32 and 64 bit code respectively.
Changes bitmask of seen sub-expressions to use dynamic storage for sub-expression indexes above 64.
Adds tests for the above.
Fixes https://github.com/boostorg/regex/issues/75.
2020-01-19 11:28:36 +00:00
3168641320 Avoid generating pointers in writeable data section.
They increase memory consumption and make exploits
easier and are completely unnecessary.
Avoid them by either avoiding the pointer indirection
completely by using char arrays for strings instead
of char pointers, convert "static" pointer variables
to simple local variables, or mark the array of
pointers as const instead of just the things pointed to.
2019-11-08 11:18:43 +01:00
7b2ccc0095 Tentative fix for msvc warnings.
See https://github.com/boostorg/regex/issues/61.
Adds warning test case.
2018-07-22 17:16:21 +01:00
a3f1cf9dfc typo in error message 'openening' should be 'opening' 2017-12-12 11:07:59 +00:00
3693a5de10 Regex: previous fix could go into infinite loop when a comment was followed by a "(", fix that. 2017-10-26 13:05:33 +01:00
50453e319a Regex: Repeating a repeat is not allowed, even if there is a comment block in between the two.
Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3479#c2
2017-10-24 17:56:02 +01:00
7de023237f Regex: Add a hard limit on the number of nested parenthesis allowed.
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3471#c2.
2017-10-19 18:23:43 +01:00
f343cab680 Regex: Fix handling of repeats when mod_x is in effect.
See https://oss-fuzz.com/v2/testcase-detail/6420486177161216?noredirect=1
2017-10-08 11:52:54 +01:00
881a157243 Regex: Fix integer overflow in expression parsing.
See: https://oss-fuzz.com/v2/testcase-detail/6189682419302400?noredirect=1
2017-10-07 09:47:19 +01:00
93926479e3 de-fuzz: suppress a couple of warnings introduced by de-fuzzing fixes. 2017-02-22 18:46:34 +00:00
2e7e73aecf de-fuzz: Prevent excessive left shifts 2017-02-22 12:52:53 +00:00
f301f3a412 de-fuzz: previous fix broke some code, re-fix it. 2017-02-21 12:43:08 +00:00
ae9f38e178 de-fuzz: Failed Pearl verbs should fail better and louder. 2017-02-18 13:04:34 +00:00
2cb49b97da de-fuzz: Fix case 0 again. 2017-02-14 17:38:47 +00:00
8337584087 De-Fuzz: Fixes for issues 0 and 3 from #12818:
Prevent left shifting by more bits than there are in type unsigned, and
Check that alternative points to a valid state before accessing it: we may not have constructed that state yet in a fail situation.
2017-02-12 19:57:35 +00:00
7719dedbaf Fix buffer over-run error when parsing invalid regex.
See: https://svn.boost.org/trac/boost/ticket/12222.
2016-06-09 19:00:29 +01:00
955d077d2b Allow types wider than int in \x{} expressions (for char32_t etc).
Fixes: https://svn.boost.org/trac/boost/ticket/11988.
2016-02-17 18:58:05 +00:00
2a525e5aa6 avoid duplicate check of markid.
Markid is already checked to be >0.
2015-11-03 14:12:17 +05:30
7a4e883675 Get THEN working for non-recursive implementation.
Fix various bugs in the other verbs exposed by new tests.
2015-10-04 19:28:25 +01:00
9a36e035f2 Add support for PRUNE and SKIP (no MARK's though). 2015-10-01 18:34:59 +01:00
c281c9cc40 Add COMMIT support plus lots of tests. 2015-09-29 17:40:43 +01:00
2580fb035f Add support for ACCEPT verb. 2015-09-26 18:47:39 +01:00
b557febb0e Start adding Perl verb support with FAIL as the first supported verb. 2015-09-25 19:30:20 +01:00
6ffcc5ede0 Change detail namespace.
Big search and replace to change name of internal namepace so it's mangled with the Boost version number - the aim is to reduce the chances of mixing different header and library versions.
2015-04-04 19:10:37 +01:00
115c4e7f42 Fix typo, see https://svn.boost.org/trac/boost/ticket/10268 2014-11-13 11:23:12 +00:00
05b582761d Fix case that differs from Perl behavior. 2014-09-25 11:45:26 +01:00
1b8322ecbf fix trac 9544: gcc 4.9.0 -std=c++1y breakage
This is GCC bug PR C++/59681 but the Boost fix is trivial and the GCC
one is (probably) not.

See: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59681
2014-01-04 22:03:10 -06:00
b738a55e0d Merge regex bug fix.
Refs #8569.

[SVN r84463]
2013-05-24 17:09:40 +00:00
f6870ad64a Merge minor fixes from Trunk.
[SVN r83498]
2013-03-19 18:48:24 +00:00
a26d66b688 Merge collected bug fixes from Trunk:
Refs #589.
Refs #7032.
Refs #7084.
Refs #6346.

[SVN r79556]
2012-07-16 08:38:23 +00:00
5964976b93 Merge warning fixes from Trunk.
Merge Documentation fixes from Trunk.
Merge updated makefiles from Trunk.

[SVN r78577]
2012-05-24 10:03:48 +00:00
090520dbb4 Merge regex changes from Trunk.
[SVN r76192]
2011-12-26 18:28:30 +00:00
fbf5c7d62c Fix infinite recursion in bad recursive expressions.
Fix bug that allows invalid regex to go unnoticed and crash later.
Fixes #5613.
Fixes #5612.

[SVN r72612]
2011-06-16 11:27:13 +00:00
27ad285fbf Fix access violation caused by past-the-end iterator deference for expressions such as ".*?".
[SVN r72540]
2011-06-10 17:03:48 +00:00
463417caba Fix bug that prevents turning off multiple Perl-modifiers at once.
Fixes #5223.

[SVN r69775]
2011-03-09 18:12:18 +00:00
29088ce346 Fix code to handle multiple named-subexpressions with the same name.
Updated test cases to match.

[SVN r65943]
2010-10-13 16:53:13 +00:00
ae013c447c In Perl mode then "something+++" should be an error.
Add the necessary error handling.
Fixes #4608.

[SVN r65145]
2010-08-31 11:25:56 +00:00
eaaf00a924 Fix bug in branch reset code.
[SVN r62478]
2010-06-06 12:38:26 +00:00
0e1e9804da Fix bug that effects recursive expressions combined with repeats.
[SVN r58722]
2010-01-05 18:04:08 +00:00
ff4eaacbc4 Symbian patches.
Fixes #3764.
Fixes #3763.

[SVN r58342]
2009-12-13 11:40:28 +00:00
35c63fc141 Fix -Wshadow gcc warnings.
Update and regenerate docs.
Fixes #3718.

[SVN r58154]
2009-12-05 12:15:20 +00:00
6e1f3dcceb Improved error messages generated for thrown exceptions.
Suppressed "gcc -Wall -Wextra -pedantic" and "msvc /W4" warnings.
Updated and rebuilt docs.


[SVN r57451]
2009-11-07 15:32:45 +00:00
9188464e39 Tighten up error handling and checking.
[SVN r57133]
2009-10-24 15:51:57 +00:00
75b99d3a37 Suppress GCC warnings.
[SVN r55688]
2009-08-20 17:27:24 +00:00
66b633b417 Added support for (?(DEFINE) blocks and updated the docs accordingly.
Added support for ICU libraries which may be named icui18n.lib on some Win32 platforms.

[SVN r55267]
2009-07-29 17:11:56 +00:00
5a6bc29d7c Added initial support for recursive expressions.
Updated docs and tests accordingly.

[SVN r54994]
2009-07-17 10:23:50 +00:00