[FFmpeg-devel] [PATCH] avcodec/hevc_parser: check for av_mallocz() failure
Paul B Mahol
onemda at gmail.com
Mon Feb 9 14:16:50 CET 2015
Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
libavcodec/hevc_parser.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/hevc_parser.c b/libavcodec/hevc_parser.c
index 834b93b..a6fdbb7 100644
--- a/libavcodec/hevc_parser.c
+++ b/libavcodec/hevc_parser.c
@@ -309,6 +309,8 @@ static int hevc_init(AVCodecParserContext *s)
{
HEVCContext *h = &((HEVCParseContext *)s->priv_data)->h;
h->HEVClc = av_mallocz(sizeof(HEVCLocalContext));
+ if (!h->HEVClc)
+ return AVERROR(ENOMEM);
h->skipped_bytes_pos_size = INT_MAX;
return 0;
--
1.7.11.2
More information about the ffmpeg-devel
mailing list