Commit 76c6971a authored by Laurent Aimar's avatar Laurent Aimar Committed by Janne Grunau

avsdemux: check for corrupted data

Signed-off-by: 's avatarJanne Grunau <janne-libav@jannau.net>
parent 7bb1807c
...@@ -163,6 +163,8 @@ static int avs_read_packet(AVFormatContext * s, AVPacket * pkt) ...@@ -163,6 +163,8 @@ static int avs_read_packet(AVFormatContext * s, AVPacket * pkt)
sub_type = avio_r8(s->pb); sub_type = avio_r8(s->pb);
type = avio_r8(s->pb); type = avio_r8(s->pb);
size = avio_rl16(s->pb); size = avio_rl16(s->pb);
if (size < 4)
return AVERROR_INVALIDDATA;
avs->remaining_frame_size -= size; avs->remaining_frame_size -= size;
switch (type) { switch (type) {
......
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