[FFmpeg-cvslog] au: validate sample rate

Justin Ruggles git at videolan.org
Thu Jan 10 11:29:27 CET 2013


ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Sun Dec 23 13:39:31 2012 -0500| [47d029a4c1b9cd203d65abcb597d5b0209cae4f8] | committer: Justin Ruggles

au: validate sample rate

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=47d029a4c1b9cd203d65abcb597d5b0209cae4f8
---

 libavformat/au.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavformat/au.c b/libavformat/au.c
index f055a6f..27feef7 100644
--- a/libavformat/au.c
+++ b/libavformat/au.c
@@ -104,6 +104,11 @@ static int au_read_header(AVFormatContext *s)
         return AVERROR_INVALIDDATA;
     }
 
+    if (rate == 0 || rate > INT_MAX) {
+        av_log(s, AV_LOG_ERROR, "Invalid sample rate: %u\n", rate);
+        return AVERROR_INVALIDDATA;
+    }
+
     /* now we are ready: build format streams */
     st = avformat_new_stream(s, NULL);
     if (!st)



More information about the ffmpeg-cvslog mailing list