[FFmpeg-cvslog] flac_parser: check return value of av_fifo_alloc()
Paul B Mahol
git at videolan.org
Sun Jun 30 18:51:43 CEST 2013
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Jun 30 16:49:45 2013 +0000| [7e112df4709578207c627d895921984d26db32c3] | committer: Paul B Mahol
flac_parser: check return value of av_fifo_alloc()
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7e112df4709578207c627d895921984d26db32c3
---
libavcodec/flac_parser.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/flac_parser.c b/libavcodec/flac_parser.c
index ded7bde..69c2965 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;
}
More information about the ffmpeg-cvslog
mailing list