mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
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: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
parent
a8a90906fb
commit
8e9c39e81f
@ -565,6 +565,11 @@ int ff_mov_read_chan(AVFormatContext *s, AVIOContext *pb, AVStream *st,
|
|||||||
label_mask = 0;
|
label_mask = 0;
|
||||||
for (i = 0; i < num_descr; i++) {
|
for (i = 0; i < num_descr; i++) {
|
||||||
uint32_t label;
|
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
|
label = avio_rb32(pb); // mChannelLabel
|
||||||
avio_rb32(pb); // mChannelFlags
|
avio_rb32(pb); // mChannelFlags
|
||||||
avio_rl32(pb); // mCoordinates[0]
|
avio_rl32(pb); // mCoordinates[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user