diff --git a/libavformat/au.c b/libavformat/au.c index 520824fc12..a414292894 100644 --- a/libavformat/au.c +++ b/libavformat/au.c @@ -86,6 +86,8 @@ static int au_read_annotation(AVFormatContext *s, int size) av_bprint_init(&bprint, 64, AV_BPRINT_SIZE_UNLIMITED); while (size-- > 0) { + if (avio_feof(pb)) + return AVERROR_EOF; c = avio_r8(pb); switch(state) { case PARSE_KEY: