Skip to content

fix: check text cursor and compact side-table bounds - #1064

Merged
andiwand merged 2 commits into
mainfrom
review/46-shared-container-bounds
Oct 5, 2026
Merged

andiwand merged 2 commits into
mainfrom
review/46-shared-container-bounds

Conversation

@andiwand

@andiwand andiwand commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

🤖 Generated with Claude Code

TextCursor::advance could violate string_view bounds, and consuming a NUL at EOF incorrectly advanced past the input. Check remaining length and distinguish an actual NUL byte from the end sentinel.

SortedSideTable could truncate a wide identifier when storing compact keys, breaking sorted order and subsequent lookups. Reject unrepresentable IDs before mutation.

Validation: rebuilt odr_test; 91 cursor, side-table, formula parser/writer and RTF document tests passed. Two focused helper tests cover rejection without state corruption. No new abstraction or parser-specific duplicate checks.

These internal precondition fixes do not change supported document behavior.

@andiwand
andiwand force-pushed the review/45-number-format-bounds branch from 9fbaaf8 to d7eaa56 Compare October 5, 2026 13:59
Base automatically changed from review/45-number-format-bounds to main October 5, 2026 14:00
andiwand and others added 2 commits October 5, 2026 16:03
The other tests in test/src/internal/common are named after the file they
test, so the TextCursor and SortedSideTable tests move from
container_bounds_test.cpp to text_cursor_test.cpp and
element_registry_test.cpp.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gb1fLafqqzehpqPuU6uBfn
@andiwand
andiwand force-pushed the review/46-shared-container-bounds branch from 3d038d9 to 6be6d26 Compare October 5, 2026 14:07
@andiwand
andiwand merged commit f3b8d5b into main Oct 5, 2026
25 checks passed
@andiwand
andiwand deleted the review/46-shared-container-bounds branch October 5, 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.

1 participant