summaryrefslogtreecommitdiff
path: root/libavformat/au.c
diff options
context:
space:
mode:
authorPeter Ross <pross@xvid.org>2010-05-31 10:47:36 +0000
committerPeter Ross <pross@xvid.org>2010-05-31 10:47:36 +0000
commit0a624147c302da7e2a232deea7c38a2bb68b10ff (patch)
tree592196be0bdf24e91def22fa1fe0218eb27717d1 /libavformat/au.c
parent274793de6e3ab77a46cae524eaecbc451154bc60 (diff)
Prevent au_read_packet() looping endlessly when .au file contains unsupported codec type.
Originally committed as revision 23392 to svn://svn.ffmpeg.org/ffmpeg/trunk
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 f8f718d4ff..a9c7d03c57 100644
--- a/libavformat/au.c
+++ b/libavformat/au.c
@@ -139,6 +139,11 @@ static int au_read_header(AVFormatContext *s,
codec = ff_codec_get_id(codec_au_tags, id);
+ if (!av_get_bits_per_sample(codec)) {
+ av_log_ask_for_sample(s, "could not determine bits per sample\n");
+ return AVERROR_INVALIDDATA;
+ }
+
if (size >= 24) {
/* skip unused data */
url_fseek(pb, size - 24, SEEK_CUR);