Skip to content
Snippets Groups Projects
Commit e51f2212 authored by Federico Tomassetti's avatar Federico Tomassetti Committed by Vittorio Giovara
Browse files

swscale: Check memory allocations


CC: libav-stable@libav.org
Bug-Id: CID 1267888 / CID 1267890
Signed-off-by: default avatarVittorio Giovara <vittorio.giovara@gmail.com>
parent 3035d21b
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment