diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-02-17 22:21:22 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-02-17 22:22:17 +0100 |
commit | 2a1b79d7e6596033618b23345aa24607f93e1614 (patch) | |
tree | 147a8611b3eb40fdeb1c88f00377f755298d18a6 /libswscale | |
parent | 880cee004418b7067605cbd9e720aabb0a617164 (diff) | |
parent | e51f22122d23589e93ac4f0b3e570bb925755915 (diff) | |
download | ffmpeg-streaming-2a1b79d7e6596033618b23345aa24607f93e1614.zip ffmpeg-streaming-2a1b79d7e6596033618b23345aa24607f93e1614.tar.gz |
Merge commit 'e51f22122d23589e93ac4f0b3e570bb925755915'
* commit 'e51f22122d23589e93ac4f0b3e570bb925755915':
swscale: Check memory allocations
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/utils.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c index 2174262..c09d37d 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1591,6 +1591,15 @@ SwsFilter *sws_getDefaultFilter(float lumaGBlur, float chromaGBlur, filter->chrV = sws_getIdentityVec(); } + if (!filter->lumH || !filter->lumV || !filter->chrH || !filter->chrV) { + sws_freeVec(filter->lumH); + sws_freeVec(filter->lumV); + sws_freeVec(filter->chrH); + sws_freeVec(filter->chrV); + av_freep(&filter); + return NULL; + } + if (chromaSharpen != 0.0) { SwsVector *id = sws_getIdentityVec(); sws_scaleVec(filter->chrH, -chromaSharpen); |