Repository navigation
Fix CodeQL alerts: size_t index math in the Laya scorer, read-only token for ci - #152
Conversation
…ken for ci cpp/integer-multiplication-cast-to-long (alerts 2, 3): the collate and padding loops in laya/scorer.cpp indexed with int * int before widening; widen first, as the rest of the file does. actions/missing-workflow-permissions (alert 1): ci.yml now declares contents: read like every other workflow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Docs7 for 1bit-monster/engine
Commit |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Closes the three open code-scanning alerts.
cpp/integer-multiplication-cast-to-long,laya/scorer.cpp): the collate and key-padding loops computedi * L + jinintbefore indexing. Each index is now widened tosize_tbefore the multiply, as the rest of the file already does. With current inputs these can't overflow; the change makes the math match the vectors'size_tsizes.actions/missing-workflow-permissions,ci.yml): the workflow now declarespermissions: contents: read, like every other workflow in the repo.laya/scorer.cppcompiles cleanly (g++ -std=c++20 -fsyntax-only).🤖 Generated with Claude Code