Commit e823e736 authored by Michael Niedermayer's avatar Michael Niedermayer

sws_getGaussianVec: check variance and quality

Found-by: Reimar
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent fe573d1a
......@@ -1435,7 +1435,12 @@ SwsVector *sws_getGaussianVec(double variance, double quality)
const int length = (int)(variance * quality + 0.5) | 1;
int i;
double middle = (length - 1) * 0.5;
SwsVector *vec = sws_allocVec(length);
SwsVector *vec;
if(variance < 0 || quality < 0)
return NULL;
vec = sws_allocVec(length);
if (!vec)
return NULL;
......
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