OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
de1568a
)
lavf: avformat_seek_file(): validate stream_index.
author
Nicolas George
<nicolas.george@normalesup.org>
Wed, 20 Mar 2013 11:27:42 +0000
(12:27 +0100)
committer
Nicolas George
<nicolas.george@normalesup.org>
Wed, 20 Mar 2013 12:35:24 +0000
(13:35 +0100)
libavformat/utils.c
patch
|
blob
|
history
diff --git
a/libavformat/utils.c
b/libavformat/utils.c
index
5cf3d9c
..
a43238b
100644
(file)
--- 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;