postproc/postprocess: Check for av_mallocz() failure
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 22 Feb 2015 02:11:08 +0000 (03:11 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 22 Feb 2015 02:11:08 +0000 (03:11 +0100)
Fixes CID1271050

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libpostproc/postprocess.c

index b8492ee..7f999f9 100644 (file)
@@ -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;