Skip to content

<regex>: add checks for integer overflow#2169

Merged
StephanTLavavej merged 18 commits into
microsoft:mainfrom
fsb4000:fix2168
Aug 27, 2022
Merged

<regex>: add checks for integer overflow#2169
StephanTLavavej merged 18 commits into
microsoft:mainfrom
fsb4000:fix2168

Conversation

@fsb4000
Copy link
Copy Markdown
Contributor

@fsb4000 fsb4000 commented Aug 29, 2021

Fixes #2168

@fsb4000 fsb4000 requested a review from a team as a code owner August 29, 2021 14:45
@fsb4000 fsb4000 marked this pull request as draft August 29, 2021 15:47
Comment thread tests/std/tests/GH_002168_regex_overflow/test.cpp Outdated
Comment thread tests/std/tests/GH_002168_regex_overflow/test.cpp Outdated
Co-authored-by: Alex Guteniev <[email protected]>
@fsb4000 fsb4000 marked this pull request as ready for review August 29, 2021 17:09
Comment thread stl/inc/regex Outdated
@fsb4000 fsb4000 marked this pull request as draft August 30, 2021 15:31
@StephanTLavavej StephanTLavavej added the bug Something isn't working label Aug 30, 2021
@CaseyCarter CaseyCarter self-assigned this Sep 1, 2021
@fsb4000 fsb4000 marked this pull request as ready for review September 4, 2021 02:27
Copy link
Copy Markdown
Contributor

@strega-nil-ms strega-nil-ms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going to push test changes, then check product code.

Comment thread tests/std/tests/GH_002168_regex_overflow/test.cpp Outdated
Copy link
Copy Markdown
Contributor

@strega-nil-ms strega-nil-ms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs some more testing changes

Comment thread stl/inc/regex
Comment thread stl/inc/regex
Comment thread stl/inc/regex
Copy link
Copy Markdown
Contributor

@strega-nil-ms strega-nil-ms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much!

@strega-nil-ms strega-nil-ms removed their assignment Aug 24, 2022
Comment thread tests/std/tests/GH_002168_regex_overflow/test.cpp Outdated
Comment thread stl/inc/regex Outdated
Comment thread stl/inc/regex Outdated
Comment thread stl/inc/regex Outdated
Comment thread tests/std/tests/GH_002168_regex_overflow/test.cpp
@StephanTLavavej
Copy link
Copy Markdown
Member

Thanks, this looks correct and complete to me! FYI @strega-nil-ms I pushed minor style changes and additional test cases after you approved.

@StephanTLavavej StephanTLavavej self-assigned this Aug 26, 2022
@StephanTLavavej
Copy link
Copy Markdown
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej StephanTLavavej changed the title <regex>: add check for overflow <regex>: add checks for integer overflow Aug 27, 2022
@StephanTLavavej StephanTLavavej merged commit f241c79 into microsoft:main Aug 27, 2022
@StephanTLavavej
Copy link
Copy Markdown
Member

Thanks two billion, one hundred forty-seven million, four hundred eighty-three thousand, six hundred forty-eight times for fixing this long-standing incorrect behavior! 🧮 🐞 😹

@fsb4000 fsb4000 deleted the fix2168 branch August 27, 2022 01:42
@StephanTLavavej StephanTLavavej added the regex meow is a substring of homeowner label Jun 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working regex meow is a substring of homeowner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

<regex>: integer overflow on large backreference value

8 participants