[FFmpeg-cvslog] avcodec/flac_parser: Update nb_headers_buffered

Michael Niedermayer git at videolan.org
Tue Dec 6 01:27:31 EET 2016


ffmpeg | branch: release/3.2 | Michael Niedermayer <michael at niedermayer.cc> | Thu Nov 24 15:29:52 2016 +0100| [2fb7eb05dcac0469cec52372f2cdb9d15d5926ae] | committer: Michael Niedermayer

avcodec/flac_parser: Update nb_headers_buffered

Fixes infinite loop
Fixes: fuzz.flac

Found-by: Frank Liberato <liberato at google.com>
Reviewed-by: Frank Liberato <liberato at google.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 2475858889cde6221677473b663df6f985add33d)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2fb7eb05dcac0469cec52372f2cdb9d15d5926ae
---

 libavcodec/flac_parser.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/flac_parser.c b/libavcodec/flac_parser.c
index f5cc35a..e69f1d7 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.                                     */



More information about the ffmpeg-cvslog mailing list