aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-03-20 13:57:59 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-03-20 13:58:04 +0100
commit9ea6c14820da382281092660cbf2b502ab6f3403 (patch)
tree64c09df96da2705d86a35d8ce352c866e3db94e1 /libavformat/utils.c
parent271f95940b0f4329d439a2d49abd16e60a003562 (diff)
parenta964d6a8a26d4e0858f7df9a6bfee949fe9c16ea (diff)
downloadffmpeg-9ea6c14820da382281092660cbf2b502ab6f3403.tar.gz
Merge remote-tracking branch 'cigaes/master'
* cigaes/master: lavu/frame: use channels rather than channel_layout. lavf: avformat_seek_file(): validate stream_index. lavf/concatdec: fix possible leak in case of malloc failure. lavfi/buffersink: check av_frame_ref() failure. Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 5cf3d9cd47..a43238bd20 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2137,6 +2137,8 @@ int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int
{
if(min_ts > ts || max_ts < ts)
return -1;
+ if (stream_index < -1 || stream_index >= (int)s->nb_streams)
+ return AVERROR(EINVAL);
if(s->seek2any>0)
flags |= AVSEEK_FLAG_ANY;