Skip to content

<regex>: add checks for integer overflow - #2169

Merged
Stephan T. Lavavej (StephanTLavavej) merged 18 commits into
microsoft:mainfrom
fsb4000:fix2168
Aug 27, 2022
Merged

<regex>: add checks for integer overflow#2169
Stephan T. Lavavej (StephanTLavavej) merged 18 commits into
microsoft:mainfrom
fsb4000:fix2168

Conversation

@fsb4000

Copy link
Copy Markdown
Contributor

Fixes #2168

@fsb4000
Igor Zhukov (fsb4000) requested a review from a team as a code owner August 29, 2021 14:45
@fsb4000
Igor Zhukov (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 <gutenev@gmail.com>
Comment thread stl/inc/regex Outdated
@fsb4000
Igor Zhukov (fsb4000) marked this pull request as ready for review September 4, 2021 02:27

Copy link
Copy Markdown
Contributor

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

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

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 nicole mazzuca (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 nicole mazzuca (@strega-nil-ms) I pushed minor style changes and additional test cases after you approved.

@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 Stephan T. Lavavej (StephanTLavavej) changed the title <regex>: add check for overflow <regex>: add checks for integer overflow Aug 27, 2022
@StephanTLavavej
Stephan T. Lavavej (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
Igor Zhukov (fsb4000) deleted the fix2168 branch August 27, 2022 01:42
@StephanTLavavej Stephan T. Lavavej (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