Commit 7e112df4 authored by Paul B Mahol's avatar Paul B Mahol

flac_parser: check return value of av_fifo_alloc()

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 9e6d063d
......@@ -692,6 +692,8 @@ static av_cold int flac_parse_init(AVCodecParserContext *c)
/* There will generally be FLAC_MIN_HEADERS buffered in the fifo before
it drains. This is allocated early to avoid slow reallocation. */
fpc->fifo_buf = av_fifo_alloc(FLAC_AVG_FRAME_SIZE * (FLAC_MIN_HEADERS + 3));
if (!fpc->fifo_buf)
return AVERROR(ENOMEM);
return 0;
}
......
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