Commit 24758588 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/flac_parser: Update nb_headers_buffered

Fixes infinite loop
Fixes: fuzz.flac
Found-by: 's avatarFrank Liberato <liberato@google.com>
Reviewed-by: 's avatarFrank Liberato <liberato@google.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent c0175fa9
......@@ -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. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment