Skip to content

fix: bound shared text and byte helpers - #1029

Merged
andiwand merged 1 commit into
mainfrom
review/11-global-core
Oct 4, 2026
Merged

andiwand merged 1 commit into
mainfrom
review/11-global-core

Conversation

@andiwand

@andiwand andiwand commented Oct 4, 2026

Copy link
Copy Markdown
Member

🤖 Generated with Claude Code

Shared ASCII helpers changed behavior under a Turkish host locale, empty replacement patterns could loop forever, and byte-patch offsets could wrap past their bounds checks. Use explicit ASCII rules, reject invalid replacement/repetition sizes, count UTF-8 with validation, and check remaining bytes before patching. Empty case-insensitive searches now follow string search semantics.

This is the first layer of the continuing file-by-file review, based on #1028. It fixes common helpers so their rendering and parsing callers share the correction. Existing search tests cover the added empty-needle cases; four small regression cases cover the other missing boundaries.

Validation: library/test build; 23 targeted tests passed, including the installed Turkish locale. Full-repository manual review is still in progress.

@andiwand
andiwand force-pushed the review/10-portable-smoke-tests branch from bebc4c0 to 0292300 Compare October 4, 2026 20:30
Base automatically changed from review/10-portable-smoke-tests to main October 4, 2026 20:31
@andiwand
andiwand force-pushed the review/11-global-core branch from b6c13b9 to 2aec3ad Compare October 4, 2026 20:38
@andiwand
andiwand merged commit cc49e6d into main Oct 4, 2026
23 checks passed
@andiwand
andiwand deleted the review/11-global-core branch October 4, 2026 20:40
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.

1 participant