Commit e8a236ad authored by Paul B Mahol's avatar Paul B Mahol

avcodec/magicyuv: set correct size of last slice for each plane

Fixes invalid read.
Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent cc4ab320
......@@ -353,7 +353,7 @@ static int decode_frame(AVCodecContext *avctx,
}
s->slices[i][j].start = offset + header_size;
s->slices[i][j].size = avpkt->size - offset;
s->slices[i][j].size = avpkt->size - s->slices[i][j].start;
}
if (bytestream2_get_byte(&gb) != s->planes)
......
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