Skip to content

Fix Coverity issues: CID 900601-900620#80

Merged
notxvilka merged 2 commits intomainfrom
fix-coverity
Feb 20, 2026
Merged

Fix Coverity issues: CID 900601-900620#80
notxvilka merged 2 commits intomainfrom
fix-coverity

Conversation

@b1llow
Copy link
Member

@b1llow b1llow commented Feb 20, 2026

INTEGER_OVERFLOW: CID 900601, 900602, 900609, 900612, 900616
FORWARD_NULL: CID 900603, 900604, 900605, 900607, 900608, 900610, 900614, 900618, 900620
CHECKED_RETURN: CID 900611, 900613, 900619
RESOURCE_LEAK: CID 900606, 900615, 900617
UNINIT: CID 900608
Copilot AI review requested due to automatic review settings February 20, 2026 12:52
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses Coverity static analysis issues (CID 900601-900620) by adding defensive null checks, bounds validation, resource leak fixes, and proper error handling throughout the codebase.

Changes:

  • Added null pointer checks before dereferencing in critical paths
  • Fixed resource leaks by ensuring proper cleanup on error paths
  • Added bounds checking for buffer operations and array accesses
  • Improved error handling by checking return values of fallible operations

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/demangler_util.c Added defensive null check for ds->buf after capacity increase
src/cplusplus/vec.h Added empty check in tail() function to prevent out-of-bounds access
src/cplusplus/v3/v3.c Added null checks for node fields, fixed resource leak in parse_module_name, added error checking for PRIMITIVE_TYPE macros, void-cast optional return values, and added output_node validation
src/cplusplus/v3/parser_combinator.c Fixed potential null dereference by conditionally setting error only when result pointer is valid
src/cplusplus/v2/v2.c Added null checks for buffer operations, bounds checking for pointer arithmetic, fixed initialization order, and added null checks for VecParam_at return values

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@b1llow b1llow requested review from notxvilka and wargio February 20, 2026 13:10
@notxvilka notxvilka merged commit 2d1d726 into main Feb 20, 2026
9 checks passed
@notxvilka notxvilka deleted the fix-coverity branch February 20, 2026 14:13
@notxvilka
Copy link

@b1llow looks like Python version has changed on AppVeyor: https://ci.appveyor.com/project/rizinorg/rz-libdemangle

@b1llow
Copy link
Member Author

b1llow commented Feb 20, 2026

@b1llow looks like Python version has changed on AppVeyor: ci.appveyor.com/project/rizinorg/rz-libdemangle

https://status.chocolatey.org/

It appears that some Chocolatey services are currently undergoing maintenance.

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.

4 participants