Skip to content

Commit

Permalink
Merge pull request #24 from cooljeanius/autofix/alert-149-ca7fd9d43c
Browse files Browse the repository at this point in the history
Fix code scanning alert NationalSecurityAgency#149: Multiplication result converted to larger type
just a simple cast
  • Loading branch information
cooljeanius authored Sep 22, 2024
2 parents 9e77536 + 46af5f1 commit f0eb0da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Ghidra/Features/Decompiler/src/decompile/cpp/constseq.cc
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ int4 ArraySequence::formByteArray(int4 sz,int4 slot,uint8 rootOff,bool bigEndian
if (count < MINIMUM_SEQUENCE_LENGTH)
return 0;
if (count != moveOps.size()) {
uint8 maxOff = rootOff + count * bigElSize;
uint8 maxOff = rootOff + static_cast<uint8>(count) * bigElSize;
vector<WriteNode> finalOps;
for(int4 i=0;i<moveOps.size();++i) {
if (moveOps[i].offset < maxOff)
Expand Down

0 comments on commit f0eb0da

Please sign in to comment.