diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-05-22 17:15:07 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-05-22 20:37:12 +0200 |
commit | a645049bd8e9fa38860d44902fcee55867f73140 (patch) | |
tree | 4392459794380818adca226cc724754667c8bcba /libswresample/swresample.c | |
parent | 50858a64bfc91a6d2717e2ecdd73b3f8322051fa (diff) | |
download | ffmpeg-a645049bd8e9fa38860d44902fcee55867f73140.tar.gz |
swr: check count argument of realloc_audio()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample/swresample.c')
-rw-r--r-- | libswresample/swresample.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libswresample/swresample.c b/libswresample/swresample.c index 60706d3def..732dae7092 100644 --- a/libswresample/swresample.c +++ b/libswresample/swresample.c @@ -344,6 +344,9 @@ static int realloc_audio(AudioData *a, int count){ int i, countb; AudioData old; + if(count < 0 || count > INT_MAX/2/a->bps/a->ch_count) + return AVERROR(EINVAL); + if(a->count >= count) return 0; |