Compare commits

..

5 Commits

Author SHA1 Message Date
a851f2141f Merge branch 'develop' 2022-06-27 18:36:04 +01:00
e5979ae1af Correct windows_gcc CI runner. 2022-06-27 09:14:55 +01:00
57aca85a8e Merge branch 'develop' 2022-06-26 18:56:14 +01:00
72f81888a5 Merge pull request #173 from boostorg/overflow_fix
Fix for numeric overflow found during fuzzing.
2022-04-08 17:22:08 +01:00
ae7819ddb1 Fix for numeric overflow found during fuzzing. 2022-04-06 17:52:09 +01:00
2 changed files with 3 additions and 1 deletions

View File

@ -158,7 +158,7 @@ jobs:
run: ../../../b2 toolset=${{ matrix.toolset }} cxxstd=${{ matrix.standard }}
working-directory: ../boost-root/libs/regex/test
windows_gcc:
runs-on: windows-latest
runs-on: windows-2019
defaults:
run:
shell: cmd

View File

@ -1019,6 +1019,8 @@ int basic_regex_creator<charT, traits>::calculate_backstep(re_syntax_base* state
{
if(rep->max != rep->min)
return -1;
if (static_cast<std::size_t>((std::numeric_limits<int>::max)() - result) < rep->min)
return -1; // protection against overflow, we can't calculate a backstep in this case and the expression is probably ill-formed.
result += static_cast<int>(rep->min);
state = rep->alt.p;
continue;