Skip to content

Handle excessively-nested custom char classes - #912

Merged
natecook1000 merged 2 commits into
mainfrom
fix/nested-ccs
Oct 28, 2026
Merged

natecook1000 merged 2 commits into
mainfrom
fix/nested-ccs

Conversation

@natecook1000

Copy link
Copy Markdown
Member

Just like with groups, excessively nested custom character classes over-recurse and can lead to a stack overflow. This adds the same depth limit to CCCs as groups.

rdar://113220839

Just like with groups, excessively nested custom character classes
over-recurse and can lead to a stack overflow. This adds the same
depth limit to CCCs as groups.

rdar://113220839
Comment thread Sources/_RegexParser/Regex/Parse/Parse.swift
Comment thread Sources/_RegexParser/Regex/Parse/Parse.swift

@clintonpi clintonpi left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks!

@natecook1000
natecook1000 merged commit 85e538f into main Oct 28, 2026
26 checks passed
@natecook1000
natecook1000 deleted the fix/nested-ccs branch October 28, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants