aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2024-05-19 22:07:32 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2024-06-02 22:29:22 +0200
commit12391b732f811fc6e868be2f08dc188e508d2567 (patch)
treef8b9535ea3c58912708f5c8a6d11851b5ed970ed
parent847a53f264db0b22dcc5a23ca9ade71a627f1c6c (diff)
downloadffmpeg-12391b732f811fc6e868be2f08dc188e508d2567.tar.gz
avcodec/tests/jpeg2000dwt: Use 64bit in comparission
Found while reviewing: CID1500309 Unintentional integer overflow Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/tests/jpeg2000dwt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/tests/jpeg2000dwt.c b/libavcodec/tests/jpeg2000dwt.c
index 6148f0dacf..520ecc05a3 100644
--- a/libavcodec/tests/jpeg2000dwt.c
+++ b/libavcodec/tests/jpeg2000dwt.c
@@ -52,7 +52,7 @@ static int test_dwt(int *array, int *ref, int border[2][2], int decomp_levels, i
return 1;
}
for (j = 0; j<MAX_W * MAX_W; j++) {
- if (FFABS(array[j] - ref[j]) > max_diff) {
+ if (FFABS(array[j] - (int64_t)ref[j]) > max_diff) {
fprintf(stderr, "missmatch at %d (%d != %d) decomp:%d border %d %d %d %d\n",
j, array[j], ref[j],decomp_levels, border[0][0], border[0][1], border[1][0], border[1][1]);
return 2;