提交 abe68364 编写于 作者: M Michael Niedermayer

swfdec: check space before copy

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: NMichael Niedermayer <michaelni@gmx.at>
上级 d1493d2c
......@@ -362,6 +362,11 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
default:
av_assert0(0);
}
if (linesize * height > pkt->size) {
res = AVERROR_INVALIDDATA;
goto bitmap_end;
}
memcpy(pkt->data, buf + colormapsize*colormapbpp, linesize * height);
res = pkt->size;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册