aboutsummaryrefslogtreecommitdiffstats
path: root/libpostproc
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-02-22 03:11:08 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-22 03:11:08 +0100
commitac424b23e404a53bb88e36496fac94d2ff9dd775 (patch)
treeead7a68918cb1ee24feadfef46e5217140509364 /libpostproc
parent45e0aa46ca9b8692487efb51274c4de004c22821 (diff)
downloadandroid_external_ffmpeg-ac424b23e404a53bb88e36496fac94d2ff9dd775.tar.gz
android_external_ffmpeg-ac424b23e404a53bb88e36496fac94d2ff9dd775.tar.bz2
android_external_ffmpeg-ac424b23e404a53bb88e36496fac94d2ff9dd775.zip
postproc/postprocess: Check for av_mallocz() failure
Fixes CID1271050 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libpostproc')
-rw-r--r--libpostproc/postprocess.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c
index b8492ee5f6..7f999f9762 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;