[FFmpeg-cvslog] postproc/postprocess: Check for av_mallocz() failure
Michael Niedermayer
git at videolan.org
Sun Feb 22 03:17:31 CET 2015
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Feb 22 03:11:08 2015 +0100| [ac424b23e404a53bb88e36496fac94d2ff9dd775] | committer: Michael Niedermayer
postproc/postprocess: Check for av_mallocz() failure
Fixes CID1271050
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ac424b23e404a53bb88e36496fac94d2ff9dd775
---
libpostproc/postprocess.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c
index b8492ee..7f999f9 100644
--- a/libpostproc/postprocess.c
+++ b/libpostproc/postprocess.c
@@ -917,6 +917,9 @@ pp_context *pp_get_context(int width, int height, int cpuCaps){
int stride= FFALIGN(width, 16); //assumed / will realloc if needed
int qpStride= (width+15)/16 + 2; //assumed / will realloc if needed
+ if (!c)
+ return NULL;
+
c->av_class = &av_codec_context_class;
if(cpuCaps&PP_FORMAT){
c->hChromaSubSample= cpuCaps&0x3;
More information about the ffmpeg-cvslog
mailing list