mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
swscale: Check memory allocations
CC: libav-stable@libav.org Bug-Id: CID 1267888 / CID 1267890 Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
This commit is contained in:
parent
3035d21b5a
commit
e51f22122d
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user