Skip to content

Commit

Permalink
Fix code scanning alert no. 686: Multiplication result converted to l…
Browse files Browse the repository at this point in the history
…arger type (#28)

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
  • Loading branch information
linxie47 and github-advanced-security[bot] authored Dec 18, 2024
1 parent 8623875 commit 1f6da3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ivsr_sdk/src/smart_patch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ void fill_image(std::vector<std::vector<int>> patchCorners, char* imgBuf, \
int img_sN = iC * iH * iW;
int img_sB = iN * iC * iH * iW;

size_t outputpixels = iB * iN * iC * iH * iW;
size_t outputpixels = static_cast<size_t>(iB) * iN * iC * iH * iW;
int * pixelCounter = new int[outputpixels]();

float * img_ptr =(float *)imgBuf;
Expand Down

0 comments on commit 1f6da3b

Please sign in to comment.