summaryrefslogtreecommitdiff
path: root/libavformat/au.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2012-12-23 13:39:31 -0500
committerJustin Ruggles <justin.ruggles@gmail.com>2013-01-09 11:52:57 -0500
commit47d029a4c1b9cd203d65abcb597d5b0209cae4f8 (patch)
tree6a30dcf00952452ce76ae81966181d24fa72af1a /libavformat/au.c
parentc837b38dd33a11c3810e988a60193a858eb4f58c (diff)
downloadffmpeg-47d029a4c1b9cd203d65abcb597d5b0209cae4f8.tar.gz
au: validate sample rate
Diffstat (limited to 'libavformat/au.c')
-rw-r--r--libavformat/au.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/au.c b/libavformat/au.c
index f055a6fdf2..27feef7e39 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)