mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/tests/jpeg2000dwt: Use 64bit in err2 computation
This issue cannot happen with the current function parameters
Fixes: CID1500309 Unintentional integer overflow
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 847a53f264
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
0e6fb091b8
commit
03df999a30
@ -52,7 +52,7 @@ static int test_dwt(int *array, int *ref, int border[2][2], int decomp_levels, i
|
||||
j, array[j], ref[j],decomp_levels, border[0][0], border[0][1], border[1][0], border[1][1]);
|
||||
return 2;
|
||||
}
|
||||
err2 += (array[j] - ref[j]) * (array[j] - ref[j]);
|
||||
err2 += (array[j] - ref[j]) * (int64_t)(array[j] - ref[j]);
|
||||
array[j] = ref[j];
|
||||
}
|
||||
ff_dwt_destroy(s);
|
||||
|
Loading…
Reference in New Issue
Block a user