aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-28 14:00:30 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-28 14:01:12 +0200
commit781f88bb26534ececc76eaa972f02536ba2f0f55 (patch)
treefe8725b25bfd20b7d9e1a3afbf00eb63f7b37122
parent9c1812491f7be2730351969f4abd9b99d300d604 (diff)
downloadffmpeg-781f88bb26534ececc76eaa972f02536ba2f0f55.tar.gz
avcodec/jpeg2000: Fix runtime error: signed integer overflow: 4185 + 2147483394 cannot be represented in type 'int'
Fixes: 1870/clusterfuzz-testcase-minimized-4686788029317120 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/jpeg2000.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/jpeg2000.h b/libavcodec/jpeg2000.h
index ed3b421ad8..873e4505ec 100644
--- a/libavcodec/jpeg2000.h
+++ b/libavcodec/jpeg2000.h
@@ -220,7 +220,7 @@ static inline int ff_jpeg2000_ceildivpow2(int a, int b)
static inline int ff_jpeg2000_ceildiv(int a, int b)
{
- return (a + b - 1) / b;
+ return (a + (int64_t)b - 1) / b;
}
/* TIER-1 routines */