diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-11-24 15:29:52 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-08-23 13:15:16 +0200 |
commit | 364f7ad5b0de79d33b2b4c159ae8e3d3b3f26096 (patch) | |
tree | 58ce74d014e7a84da9fabbea368231366c603594 | |
parent | 5497fa83f915b7194d409ce073f90f2ad36d21ce (diff) | |
download | ffmpeg-364f7ad5b0de79d33b2b4c159ae8e3d3b3f26096.tar.gz |
avcodec/flac_parser: Update nb_headers_buffered
Fixes infinite loop
Fixes: fuzz.flac
Found-by: Frank Liberato <liberato@google.com>
Reviewed-by: Frank Liberato <liberato@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2475858889cde6221677473b663df6f985add33d)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/flac_parser.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/flac_parser.c b/libavcodec/flac_parser.c index 7faf1389ea..33efda53ca 100644 --- a/libavcodec/flac_parser.c +++ b/libavcodec/flac_parser.c @@ -579,10 +579,12 @@ static int flac_parse(AVCodecParserContext *s, AVCodecContext *avctx, temp = curr->next; av_freep(&curr->link_penalty); av_free(curr); + fpc->nb_headers_buffered--; } fpc->headers = fpc->best_header->next; av_freep(&fpc->best_header->link_penalty); av_freep(&fpc->best_header); + fpc->nb_headers_buffered--; } /* Find and score new headers. */ |