Commit 04647673 authored by Marton Balint's avatar Marton Balint

lavf/asfenc: check the number of streams in header

Reviewed-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
Signed-off-by: 's avatarMarton Balint <cus@passwd.hu>
parent 7e6b788f
......@@ -684,6 +684,11 @@ static int asf_write_header(AVFormatContext *s)
s->max_interleave_delta = 0;
asf->nb_packets = 0;
if (s->nb_streams > 127) {
av_log(s, AV_LOG_ERROR, "ASF can only handle 127 streams\n");
return AVERROR(EINVAL);
}
asf->index_ptr = av_malloc(sizeof(ASFIndex) * ASF_INDEX_BLOCK);
if (!asf->index_ptr)
return AVERROR(ENOMEM);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment