diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-11-24 15:29:52 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-12-04 20:25:15 +0100 |
commit | 6bee6ef0c2ec264b5362d59d8541849653d2456d (patch) | |
tree | cf33534912802c688f8c2493b09447bf45028733 | |
parent | ff01dbb6ec88285d11fb87be109007f398cb0e56 (diff) | |
download | ffmpeg-6bee6ef0c2ec264b5362d59d8541849653d2456d.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 183fe6e5c9..6df531b7b3 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. */ |