aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2007-06-10 20:35:01 +0000
committerDiego Biurrun <diego@biurrun.de>2007-06-10 20:35:01 +0000
commit19ecf882882679aef24512022316eec4f57b9b0d (patch)
tree000fe8cac2c640502fc41393d7739516923e1856 /libavformat
parent364a96070433d4c843620074d96dce562236ce6e (diff)
downloadffmpeg-19ecf882882679aef24512022316eec4f57b9b0d.tar.gz
Add a bounds check on AVProbeData input.
patch by Ronald S. Bultje, rbultje ronald.bitfreak net thread: Date: Sat, 09 Jun 2007 19:22:17 -0400 Subject: [FFmpeg-devel] lavf probing Originally committed as revision 9275 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index d543461c81..0b7b5ee402 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1936,7 +1936,7 @@ int av_find_stream_info(AVFormatContext *ic)
}
}
}else if(st->codec->codec_type == CODEC_TYPE_AUDIO) {
- if (st->codec->codec_id == CODEC_ID_NONE) {
+ if (st->codec->codec_id == CODEC_ID_NONE && probe_data[st->index].buf_size > 0) {
codec_identified[st->index] = set_codec_from_probe_data(st, &(probe_data[st->index]), 0);
if (codec_identified[st->index]) {
st->need_parsing = AVSTREAM_PARSE_FULL;