diff options
author | unknown author <ports@freebsd> | 2011-04-25 01:48:46 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-04-25 01:54:29 +0200 |
commit | 2671ab3996672c43b02076daca5bf00c5a6f1c68 (patch) | |
tree | 30ba88f1ad12ccbd591c12ad373b6cff3219a391 /libswscale | |
parent | 03546a9ac8753b3f083ae3d2a6397c8c0011923b (diff) | |
download | ffmpeg-2671ab3996672c43b02076daca5bf00c5a6f1c68.tar.gz |
Check mmap() return against correct value
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/utils.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c index a343bf2570..6e8e40b5cc 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -919,7 +919,11 @@ int sws_init_context(SwsContext *c, SwsFilter *srcFilter, SwsFilter *dstFilter) c->chrMmx2FilterCode = av_malloc(c->chrMmx2FilterCodeSize); #endif +#ifdef MAP_ANONYMOUS + if (c->lumMmx2FilterCode == MAP_FAILED || c->chrMmx2FilterCode == MAP_FAILED) +#else if (!c->lumMmx2FilterCode || !c->chrMmx2FilterCode) +#endif return AVERROR(ENOMEM); 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); |