Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes a critical heap-buffer-overflow vulnerability in the parse_base36 function and adds comprehensive regression tests to prevent similar issues in the future.
Changes:
- Added bounds checking to
parse_base36to prevent out-of-bounds reads when mangled input ends with base36 characters - Added regression tests covering multiple scenarios where the vulnerability could be triggered
- Documented the root cause of the vulnerability in test comments
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/cplusplus/v3/v3.c | Added bounds check p->cur + sz < p->end to prevent reading past buffer end in parse_base36 |
| test/unit/test_cxx_rules.c | Added comprehensive regression tests for the heap-buffer-overflow vulnerability with multiple test cases |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
notxvilka
approved these changes
Feb 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.