diff options
author | Paul B Mahol <onemda@gmail.com> | 2016-06-02 22:40:57 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2016-06-02 22:43:51 +0200 |
commit | e8a236add82e668c3e665a4ab38c91d875047e43 (patch) | |
tree | e5ced5239851f8ed9b3651e2e21dc42ed699ba1c /libavcodec/magicyuv.c | |
parent | cc4ab320cf0e830165a871839b6cf84536b413c8 (diff) | |
download | ffmpeg-e8a236add82e668c3e665a4ab38c91d875047e43.tar.gz |
avcodec/magicyuv: set correct size of last slice for each plane
Fixes invalid read.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/magicyuv.c')
-rw-r--r-- | libavcodec/magicyuv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/magicyuv.c b/libavcodec/magicyuv.c index d96084d2d6..cd703e7c8a 100644 --- a/libavcodec/magicyuv.c +++ b/libavcodec/magicyuv.c @@ -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) |