diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-11-24 15:29:52 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-12-01 23:50:40 +0100 |
commit | 46edc6d5ef24018c06233cfddd779ca849c667ea (patch) | |
tree | d011236e4e761ab29f1c5a498d1c70b825dd474d /libavcodec/flac_parser.c | |
parent | 046cc06f5a23e93e49f72ee1bc6efedbd5ca3b95 (diff) | |
download | ffmpeg-46edc6d5ef24018c06233cfddd779ca849c667ea.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>
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 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. */ |