On Sat, May 23, 2015 at 11:04 PM, Andreas Cadhalpun <[email protected]> wrote: > Otherwise the loop can take a lot of time if num_descr is very large. > > Signed-off-by: Andreas Cadhalpun <[email protected]> > --- > libavformat/mov_chan.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/libavformat/mov_chan.c b/libavformat/mov_chan.c > index e36034e..a2fa8d6 100644 > --- a/libavformat/mov_chan.c > +++ b/libavformat/mov_chan.c > @@ -566,6 +566,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]
1 to 3 look fine to me. There is something missing on 4/4 I'll take a stab at it. -- Vittorio _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
