[FFmpeg-devel,1/4] avcodec/flac_parser: do not over-decrement nb_headers_buffered

Submitted by Michael Niedermayer on Sept. 19, 2019, 7:37 p.m.

Details

Message ID 20190919193741.21138-1-michael@niedermayer.cc
State Accepted
Commit 047a6d396f6919c469e35d6ef75bd9cae5a87523
Headers show

Commit Message

Michael Niedermayer Sept. 19, 2019, 7:37 p.m.
Fixes: Timeout
Fixes: 15400/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FLAC_fuzzer-5669509794365440

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavcodec/flac_parser.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Michael Niedermayer Oct. 8, 2019, 10:58 a.m.
On Thu, Sep 19, 2019 at 09:37:38PM +0200, Michael Niedermayer wrote:
> Fixes: Timeout
> Fixes: 15400/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FLAC_fuzzer-5669509794365440
> 
> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  libavcodec/flac_parser.c | 1 -
>  1 file changed, 1 deletion(-)

An identical patch was pushed:

https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/047a6d396f6919c469e35d6ef75bd9cae5a87523

[...]

Patch hide | download patch | download mbox

diff --git a/libavcodec/flac_parser.c b/libavcodec/flac_parser.c
index 2721286464..f085159d1d 100644
--- a/libavcodec/flac_parser.c
+++ b/libavcodec/flac_parser.c
@@ -570,7 +570,6 @@  static int flac_parse(AVCodecParserContext *s, AVCodecContext *avctx,
         for (curr = best_child->next; curr; curr = curr->next)
             curr->offset -= best_child->offset;
 
-        fpc->nb_headers_buffered--;
         best_child->offset = 0;
         fpc->headers       = best_child;
         if (fpc->nb_headers_buffered >= FLAC_MIN_HEADERS) {