Mercurial > mplayer.hg
changeset 30822:ed3b3682cdde
Check for allocation failure for c->lumMmx2FilterCode and c->chrMmx2FilterCode.
author | reimar |
---|---|
date | Mon, 08 Mar 2010 19:41:57 +0000 |
parents | d59dfdf82fca |
children | 4dfdb57de907 |
files | libswscale/utils.c |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libswscale/utils.c Mon Mar 08 19:37:10 2010 +0000 +++ b/libswscale/utils.c Mon Mar 08 19:41:57 2010 +0000 @@ -968,6 +968,8 @@ 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);