summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <[email protected]>2020-10-15 22:19:32 +0200
committerMichael Niedermayer <[email protected]>2021-10-09 22:02:19 +0200
commitad6ab4167307359efea092e29eee45779d03a6f1 (patch)
tree8252f4f5702861c25f7eb765ac3fe32e5a98a049
parent1b4c3b54a61b4dd2fb4a50c72a0c1a79ba4e1939 (diff)
avformat/au: Check for EOF in au_read_annotation()
Fixes: Timeout (too looong -> 1 ms) Fixes: 26366/clusterfuzz-testcase-minimized-ffmpeg_dem_SDX_fuzzer-5655584843759616 Fixes: 26391/clusterfuzz-testcase-minimized-ffmpeg_dem_ALP_fuzzer-5484026133217280 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit e680d50eb4feddafb2d8575b21fc5fc8764f4801) Signed-off-by: Michael Niedermayer <[email protected]>
-rw-r--r--libavformat/au.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/au.c b/libavformat/au.c
index f70f827201..2cc90109df 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: