提交 6de33611 编写于 作者: L Laurent Aimar 提交者: Janne Grunau

avsdemux: check for out of bound writes

Signed-off-by: NJanne Grunau <janne-libav@jannau.net>
上级 de049a95
......@@ -169,6 +169,8 @@ static int avs_read_packet(AVFormatContext * s, AVPacket * pkt)
switch (type) {
case AVS_PALETTE:
if (size - 4 > sizeof(palette))
return AVERROR_INVALIDDATA;
ret = avio_read(s->pb, palette, size - 4);
if (ret < size - 4)
return AVERROR(EIO);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册