diff options
author | Alexandra Hájková <alexandra.khirnova@gmail.com> | 2015-07-21 11:45:01 +0300 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2015-07-22 13:11:46 +0300 |
commit | 2a187a074a7f5ad9f01f72ac9715ddfcb2dbb8ec (patch) | |
tree | e2059f80134143e347f96e990a8527ed0af5f9e5 /libavformat | |
parent | 93f16f338f9e8aba0c006752eb3afc3fe6e137fd (diff) |
asfdec: avoid crash in the case when chunk_len is 0 or pkt_len is 0
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/asfdec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c index 6a71be9ab2..6dc34d9735 100644 --- a/libavformat/asfdec.c +++ b/libavformat/asfdec.c @@ -776,6 +776,8 @@ static int asf_read_stream_properties(AVFormatContext *s, const GUIDParseTable * asf_st->span = span; asf_st->virtual_pkt_len = avio_rl16(pb); asf_st->virtual_chunk_len = avio_rl16(pb); + if (!asf_st->virtual_chunk_len || !asf_st->virtual_pkt_len) + return AVERROR_INVALIDDATA; avio_skip(pb, err_data_len - 5); } else avio_skip(pb, err_data_len - 1); |