Fix a potential out of bounds read when building a XbBuilderNode - #335
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (4)
📝 WalkthroughWalkthroughThe change adds ChangesBounded text splitting
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/xb-self-test.c`:
- Around line 2698-2707: The xb_builder_node_nul_func test does not verify the
text set on root. After each xb_builder_node_set_text call, read back or export
the node and assert the expected result, including the explicitly sized A\nB
buffer case; retain coverage for the zero-length input without treating it as
xb_strsplit coverage.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 3c491036-51a6-4520-a3a8-40bcbeccec3e
📒 Files selected for processing (4)
src/xb-builder-node.csrc/xb-common-private.hsrc/xb-common.csrc/xb-self-test.c
Although xb_builder_node_set_text() is normally NUL-terminated, it doesn't have to be. Split the string taking into account the possibility that NUL is missing. Found by Aisle Research, many thanks.
d8959ba to
158237c
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
Although xb_builder_node_set_text() is normally NUL-terminated, it doesn't have to be. Split the string taking into account the possibility that NUL is missing.
Found by Aisle Research, many thanks.
Summary by CodeRabbit
Bug Fixes
Tests