diff options
author | Laurent Aimar <fenrir@videolan.org> | 2011-09-30 23:42:31 +0000 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2012-03-18 17:50:40 +0100 |
commit | b696d61518bba0514cf72ce765572275d12c0bf7 (patch) | |
tree | 679b20b2357bcf1308c2ae2496e9bbedc6e29ee7 | |
parent | a23bcc923d73bfe5fe1d4c8e43359466b24bb0ab (diff) | |
download | ffmpeg-b696d61518bba0514cf72ce765572275d12c0bf7.tar.gz |
avsdemux: check for corrupted data
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
(cherry picked from commit 76c6971a6464705f263fc30e537b370a3a7c853b)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
-rw-r--r-- | libavformat/avs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/avs.c b/libavformat/avs.c index bd9b31d0f4..52294b0b40 100644 --- a/libavformat/avs.c +++ b/libavformat/avs.c @@ -163,6 +163,8 @@ static int avs_read_packet(AVFormatContext * s, AVPacket * pkt) sub_type = avio_r8(s->pb); type = avio_r8(s->pb); size = avio_rl16(s->pb); + if (size < 4) + return AVERROR_INVALIDDATA; avs->remaining_frame_size -= size; switch (type) { |