Commit e51f2212 authored by Federico Tomassetti's avatar Federico Tomassetti Committed by Vittorio Giovara

swscale: Check memory allocations

CC: libav-stable@libav.org
Bug-Id: CID 1267888 / CID 1267890
Signed-off-by: 's avatarVittorio Giovara <vittorio.giovara@gmail.com>
parent 3035d21b
......@@ -1382,6 +1382,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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment