aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-11-24 15:29:52 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2016-12-05 18:29:12 +0100
commit0d8a17410b2f6ee9524e36a50da5309443cf8394 (patch)
treeb7d326feb1fa4d85579b3c4baf43481be75634c2
parent60ca730d215a99f0e275b3b3f8e09f4d820c16b8 (diff)
downloadffmpeg-0d8a17410b2f6ee9524e36a50da5309443cf8394.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.c2
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. */