Commit 6de33611 authored by Laurent Aimar's avatar Laurent Aimar Committed by Janne Grunau

avsdemux: check for out of bound writes

Signed-off-by: 's avatarJanne Grunau <janne-libav@jannau.net>
parent 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% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment