diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2010-03-08 19:41:57 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2010-03-08 19:41:57 +0000 |
commit | 97cda76a69afe59dae6168f8bf13a9170343d380 (patch) | |
tree | 48ac75fd20f7ffc5dd2e4e7970e5845b7f8d229e | |
parent | 12423f170f4371c0c02f20676564ae73e856dd36 (diff) | |
download | ffmpeg-97cda76a69afe59dae6168f8bf13a9170343d380.tar.gz |
Check for allocation failure for c->lumMmx2FilterCode and c->chrMmx2FilterCode.
Originally committed as revision 30864 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
-rw-r--r-- | libswscale/utils.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c index 2b9f272825..5409980eb1 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -968,6 +968,8 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, 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); |