avformat/avidec: Use 64bit in get_duration()
Fixes: signed integer overflow: 2147483424 + 8224 cannot be represented in type 'int'
Fixes: 29619/clusterfuzz-testcase-minimized-ffmpeg_dem_AVI_fuzzer-5191424373030912
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a0ceb0cdd4)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
ab5341768c
commit
4518df7937
1 changed files with 1 additions and 1 deletions
|
|
@ -130,7 +130,7 @@ static inline int get_duration(AVIStream *ast, int len)
|
|||
if (ast->sample_size)
|
||||
return len;
|
||||
else if (ast->dshow_block_align)
|
||||
return (len + ast->dshow_block_align - 1) / ast->dshow_block_align;
|
||||
return (len + (int64_t)ast->dshow_block_align - 1) / ast->dshow_block_align;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue