[FFmpeg-cvslog] r30864 - trunk/libswscale/utils.c

reimar subversion
Mon Mar 8 20:41:58 CET 2010


Author: reimar
Date: Mon Mar  8 20:41:57 2010
New Revision: 30864

Log:
Check for allocation failure for c->lumMmx2FilterCode and c->chrMmx2FilterCode.

Modified:
   trunk/libswscale/utils.c

Modified: trunk/libswscale/utils.c
==============================================================================
--- trunk/libswscale/utils.c	Mon Mar  8 20:37:10 2010	(r30863)
+++ trunk/libswscale/utils.c	Mon Mar  8 20:41:57 2010	(r30864)
@@ -968,6 +968,8 @@ SwsContext *sws_getContext(int srcW, int
             c->chrMmx2FilterCode = av_malloc(c->chrMmx2FilterCodeSize);
 #endif
 
+            if (!c->lumMmx2FilterCode || !c->chrMmx2FilterCode)
+                goto fail;
             FF_ALLOCZ_OR_GOTO(c, c->hLumFilter   , (dstW        /8+8)*sizeof(int16_t), fail);
             FF_ALLOCZ_OR_GOTO(c, c->hChrFilter   , (c->chrDstW  /4+8)*sizeof(int16_t), fail);
             FF_ALLOCZ_OR_GOTO(c, c->hLumFilterPos, (dstW      /2/8+8)*sizeof(int32_t), fail);



More information about the ffmpeg-cvslog mailing list