summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavformat/asfdec_o.c2
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);