[FFmpeg-cvslog] swr: check count argument of realloc_audio()
Michael Niedermayer
git at videolan.org
Tue May 22 20:40:56 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue May 22 17:15:07 2012 +0200| [a645049bd8e9fa38860d44902fcee55867f73140] | committer: Michael Niedermayer
swr: check count argument of realloc_audio()
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a645049bd8e9fa38860d44902fcee55867f73140
---
libswresample/swresample.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index 60706d3..732dae7 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;
More information about the ffmpeg-cvslog
mailing list