BUG: Fix buffer overrun in CPU baseline validation#30877
Merged
seberg merged 2 commits intonumpy:mainfrom Feb 26, 2026
Merged
Conversation
Member
|
Thanks, but isn't the |
Use sizeof() - 1 to exclude the string literal's null terminator when copying feature names into baseline_failure, preventing a buffer overrun and embedded nulls that truncated the error message. Uncovered by Coverity static analysis
67e1fa6 to
d6a8053
Compare
Contributor
Author
Right. Rebased. |
seberg
approved these changes
Feb 26, 2026
Member
seberg
left a comment
There was a problem hiding this comment.
Thanks, should go in once tests pass. Out of lazyness, I just pushed a fix here for that new warning in MSVC, no idea why it started showing up now.
From what I can tell briefly, there is on nice way to test this so...
charris
pushed a commit
to charris/numpy
that referenced
this pull request
Mar 4, 2026
Co-authored-by: Sebastian Berg <sebastianb@nvidia.com>
charris
added a commit
that referenced
this pull request
Mar 4, 2026
BUG: Fix buffer overrun in CPU baseline validation (#30877)
sabasiddique1
pushed a commit
to sabasiddique1/numpy
that referenced
this pull request
Mar 4, 2026
Co-authored-by: Sebastian Berg <sebastianb@nvidia.com>
3 tasks
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.
Use sizeof() - 1 to exclude the string literal's null terminator when copying feature names into baseline_failure, preventing a buffer overrun and embedded nulls that truncated the error message.
Uncovered by Coverity static analysis
Fixes: #30477