Commit 8e9c39e8 authored by Andreas Cadhalpun's avatar Andreas Cadhalpun Committed by Luca Barbato

mov: abort on EOF in ff_mov_read_chan

Otherwise the loop can take a lot of time if num_descr is very large.
Signed-off-by: 's avatarAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: 's avatarLuca Barbato <lu_zero@gentoo.org>
parent a8a90906
......@@ -565,6 +565,11 @@ int ff_mov_read_chan(AVFormatContext *s, AVIOContext *pb, AVStream *st,
label_mask = 0;
for (i = 0; i < num_descr; i++) {
uint32_t label;
if (pb->eof_reached) {
av_log(s, AV_LOG_ERROR,
"reached EOF while reading channel layout\n");
return AVERROR_INVALIDDATA;
}
label = avio_rb32(pb); // mChannelLabel
avio_rb32(pb); // mChannelFlags
avio_rl32(pb); // mCoordinates[0]
......
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