X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fcafdec.c;h=80c5bb596280b5e8abc847e63c85789a641d10af;hb=1fc396318833280a520bf568d5605791decf87d7;hp=c797e20c097f6d2b61e560b390f8c2c18ba680c9;hpb=af5ec182252d869c62e327b3b2ffe3dc043fabbd;p=ffmpeg diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c index c797e20c097..80c5bb59628 100644 --- a/libavformat/cafdec.c +++ b/libavformat/cafdec.c @@ -109,10 +109,9 @@ static int read_kuki_chunk(AVFormatContext *s, int64_t size) The lavc AAC decoder requires the data from the codec specific description as extradata input. */ int strt, skip; - MOVAtom atom; strt = avio_tell(pb); - ff_mov_read_esds(s, pb, atom); + ff_mov_read_esds(s, pb); skip = size - (avio_tell(pb) - strt); if (skip < 0 || !st->codec->extradata || st->codec->codec_id != AV_CODEC_ID_AAC) { @@ -205,7 +204,7 @@ static void read_info_chunk(AVFormatContext *s, int64_t size) AVIOContext *pb = s->pb; unsigned int i; unsigned int nb_entries = avio_rb32(pb); - for (i = 0; i < nb_entries; i++) { + for (i = 0; i < nb_entries && !avio_feof(pb); i++) { char key[32]; char value[1024]; avio_get_str(pb, INT_MAX, key, sizeof(key));