diff options
| author | Eric Harvey <71228603+Eharve14@users.noreply.github.com> | 2022-01-18 15:55:10 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-18 21:55:10 +0100 |
| commit | 241e9e8efeb6750ef4202a61b3a436628e4f6d23 (patch) | |
| tree | 9a38bc9eb12cc5aa485f0ecec940c9fff3e7d341 /src/lib/openjp2/mct.c | |
| parent | d87fd9279a9e0f8ce8fb23ab10e536410a907336 (diff) | |
Fix potential overflow related issues spotted by LGTM code analysis (#1402)
Diffstat (limited to 'src/lib/openjp2/mct.c')
| -rw-r--r-- | src/lib/openjp2/mct.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/openjp2/mct.c b/src/lib/openjp2/mct.c index 88c8f409..78058128 100644 --- a/src/lib/openjp2/mct.c +++ b/src/lib/openjp2/mct.c @@ -457,7 +457,7 @@ void opj_calculate_norms(OPJ_FLOAT64 * pNorms, for (j = 0; j < pNbComps; ++j) { lCurrentValue = lMatrix[lIndex]; lIndex += pNbComps; - lNorms[i] += lCurrentValue * lCurrentValue; + lNorms[i] += (OPJ_FLOAT64) lCurrentValue * lCurrentValue; } lNorms[i] = sqrt(lNorms[i]); } |
