summaryrefslogtreecommitdiff
path: root/libavcodec/flac_parser.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2013-06-30 16:49:45 +0000
committerPaul B Mahol <onemda@gmail.com>2013-06-30 16:49:45 +0000
commit7e112df4709578207c627d895921984d26db32c3 (patch)
treea31c74f7b9ccba5241beab5216f8e05476506768 /libavcodec/flac_parser.c
parent9e6d063dbc47d76cf79f98f531deca8b4afb879f (diff)
flac_parser: check return value of av_fifo_alloc()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/flac_parser.c')
-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 ded7bde2aa..69c2965f65 100644
--- a/libavcodec/flac_parser.c
+++ b/libavcodec/flac_parser.c
@@ -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;
}