Commit 781f88bb authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/jpeg2000: Fix runtime error: signed integer overflow: 4185 +...

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/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 9c181249
...@@ -220,7 +220,7 @@ static inline int ff_jpeg2000_ceildivpow2(int a, int b) ...@@ -220,7 +220,7 @@ static inline int ff_jpeg2000_ceildivpow2(int a, int b)
static inline int ff_jpeg2000_ceildiv(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 */ /* TIER-1 routines */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment