mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
avcodec/magicyuv: Check early for invalid slices
Every plane of each slice has to contain at least two bytes for flags and the type of prediction used. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
310d4062e7
commit
3c172a2fb9
@ -614,6 +614,8 @@ static int magy_decode_frame(AVCodecContext *avctx, void *data,
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
s->slices[i][j].size = next_offset - offset;
|
||||
if (s->slices[i][j].size < 2)
|
||||
return AVERROR_INVALIDDATA;
|
||||
offset = next_offset;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user