Commit 5d44c061 authored by Laurent Aimar's avatar Laurent Aimar Committed by Michael Niedermayer

Check for out of bound writes in the avs demuxer.

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 1cce7def
...@@ -169,6 +169,8 @@ static int avs_read_packet(AVFormatContext * s, AVPacket * pkt) ...@@ -169,6 +169,8 @@ static int avs_read_packet(AVFormatContext * s, AVPacket * pkt)
switch (type) { switch (type) {
case AVS_PALETTE: case AVS_PALETTE:
if (size - 4 > sizeof(palette))
return AVERROR_INVALIDDATA;
ret = avio_read(s->pb, palette, size - 4); ret = avio_read(s->pb, palette, size - 4);
if (ret < size - 4) if (ret < size - 4)
return AVERROR(EIO); 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