mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-24 02:20:56 +01:00
sws_allocVec: check length validity
Found-by: Reimar Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
a9d97e1b0a
commit
fe573d1a9b
1 changed files with 6 additions and 1 deletions
|
|
@ -1415,7 +1415,12 @@ SwsFilter *sws_getDefaultFilter(float lumaGBlur, float chromaGBlur,
|
|||
|
||||
SwsVector *sws_allocVec(int length)
|
||||
{
|
||||
SwsVector *vec = av_malloc(sizeof(SwsVector));
|
||||
SwsVector *vec;
|
||||
|
||||
if(length <= 0 || length > INT_MAX/ sizeof(double))
|
||||
return NULL;
|
||||
|
||||
vec = av_malloc(sizeof(SwsVector));
|
||||
if (!vec)
|
||||
return NULL;
|
||||
vec->length = length;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue