Skip to content

unified: Avoid overflow in taint reach per million nodes - #22833

Open
asgerf wants to merge 1 commit into
github:mainfrom
asgerf:unified/fix-taint-reach-overflow
Open

asgerf wants to merge 1 commit into
github:mainfrom
asgerf:unified/fix-taint-reach-overflow

Conversation

@asgerf

@asgerf asgerf commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

This causes integer overflow on some projects. Do the division as floating point and truncate afterwards.

Copilot AI max review requested due to automatic review settings October 15, 2026 14:22
@asgerf asgerf added the no-change-note-required This PR does not need a change note label Oct 15, 2026
@asgerf
asgerf requested a review from a team as a code owner October 15, 2026 14:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The localized arithmetic fix prevents intermediate integer overflow while preserving the metric’s intended behavior.

0 open findings

What changed in this PR

Fixes integer overflow in the unified analysis-quality metric for taint reach per million nodes.

Changes:

  • Uses floating-point arithmetic before flooring the result, preserving integer output and zero-candidate handling.
File Description
unified/​ql/​lib/​codeql/​unified/​internal/​AnalysisQuality.qll Avoids overflow in the per-million calculation.

🧠 Review effort: Max


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-change-note-required This PR does not need a change note Unified

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants