mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
avcodec/tiff: Check tile_length and tile_width
Fixes: Division by 0 Fixes: 49235/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5495613847896064 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
5114ce1e2a
commit
76112c2b41
@ -965,6 +965,9 @@ static int dng_decode_tiles(AVCodecContext *avctx, AVFrame *frame,
|
||||
int pos_x = 0, pos_y = 0;
|
||||
int ret;
|
||||
|
||||
if (s->tile_width <= 0 || s->tile_length <= 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
has_width_leftover = (s->width % s->tile_width != 0);
|
||||
has_height_leftover = (s->height % s->tile_length != 0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user