* 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>
... | ... |
@@ -776,6 +776,8 @@ static int asf_read_stream_properties(AVFormatContext *s, const GUIDParseTable * |
776 | 776 |
asf_st->span = span; |
777 | 777 |
asf_st->virtual_pkt_len = avio_rl16(pb); |
778 | 778 |
asf_st->virtual_chunk_len = avio_rl16(pb); |
779 |
+ if (!asf_st->virtual_chunk_len || !asf_st->virtual_pkt_len) |
|
780 |
+ return AVERROR_INVALIDDATA; |
|
779 | 781 |
avio_skip(pb, err_data_len - 5); |
780 | 782 |
} else |
781 | 783 |
avio_skip(pb, err_data_len - 1); |