diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-11-24 15:29:52 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-11-30 00:58:56 +0100 |
commit | 2475858889cde6221677473b663df6f985add33d (patch) | |
tree | d79609cfb4028ad8882050dae723db648be0b002 /libavcodec/flac_parser.c | |
parent | c0175fa92b7edd45a06e4ab16c8e83da0c94a9f6 (diff) | |
download | ffmpeg-2475858889cde6221677473b663df6f985add33d.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>
Diffstat (limited to 'libavcodec/flac_parser.c')
-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 f5cc35a4f2..e69f1d72e9 100644 --- a/libavcodec/flac_parser.c +++ b/libavcodec/flac_parser.c @@ -586,10 +586,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. */ |