diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-07-22 17:13:15 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-07-22 17:13:18 +0200 |
commit | 6b9be608ce926ff2f858936e2aac4115400887cc (patch) | |
tree | 7210ab91915f2dbc58410d3b6a96278971f1843c /libavformat | |
parent | fa7defc89a7b6716aa853451134e5663cabb902d (diff) | |
parent | 2a187a074a7f5ad9f01f72ac9715ddfcb2dbb8ec (diff) | |
download | ffmpeg-6b9be608ce926ff2f858936e2aac4115400887cc.tar.gz |
Merge commit '2a187a074a7f5ad9f01f72ac9715ddfcb2dbb8ec'
* commit '2a187a074a7f5ad9f01f72ac9715ddfcb2dbb8ec':
asfdec: avoid crash in the case when chunk_len is 0 or pkt_len is 0
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/asfdec_o.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/asfdec_o.c b/libavformat/asfdec_o.c index 2b26aea426..0160b35f1e 100644 --- a/libavformat/asfdec_o.c +++ b/libavformat/asfdec_o.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); |