Skip to content

BUG: Fix buffer overrun in CPU baseline validation (#30877)#30922

Merged
charris merged 1 commit intonumpy:maintenance/2.4.xfrom
charris:backport-30877
Mar 4, 2026
Merged

BUG: Fix buffer overrun in CPU baseline validation (#30877)#30922
charris merged 1 commit intonumpy:maintenance/2.4.xfrom
charris:backport-30877

Conversation

@charris
Copy link
Copy Markdown
Member

@charris charris commented Mar 4, 2026

Backport of #30877.

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

Co-authored-by: Sebastian Berg <sebastianb@nvidia.com>
@charris charris added this to the 2.4.3 release milestone Mar 4, 2026
@charris charris added 00 - Bug 08 - Backport Used to tag backport PRs labels Mar 4, 2026
@charris charris merged commit 62df6a5 into numpy:maintenance/2.4.x Mar 4, 2026
74 checks passed
@charris charris deleted the backport-30877 branch March 4, 2026 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

00 - Bug 08 - Backport Used to tag backport PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants