diff mbox series

[FFmpeg-devel,3/6] avformat/au: Check for EOF in au_read_annotation()

Message ID 20201017220842.17409-3-michael@niedermayer.cc
State New
Headers show
Series [FFmpeg-devel,1/6] avformat/asfdec_f: Check for negative ext_len
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished

Commit Message

Michael Niedermayer Oct. 17, 2020, 10:08 p.m. UTC
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 <michael@niedermayer.cc>
---
 libavformat/au.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Michael Niedermayer Oct. 23, 2020, 8:04 a.m. UTC | #1
On Sun, Oct 18, 2020 at 12:08:39AM +0200, Michael Niedermayer wrote:
> 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 <michael@niedermayer.cc>
> ---
>  libavformat/au.c | 2 ++
>  1 file changed, 2 insertions(+)

will apply

[...]
diff mbox series

Patch

diff --git a/libavformat/au.c b/libavformat/au.c
index c09f4da4c9..b4eb4f8477 100644
--- a/libavformat/au.c
+++ b/libavformat/au.c
@@ -84,6 +84,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: