diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-08-03 14:15:14 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-08-06 01:34:54 +0300 |
commit | 67f421fd77ec7ff6bbd6acb6adaa29e9ab477995 (patch) | |
tree | f430b5c1f50adc0d377f8adc49c542efadf3c9ff /ffplay.c | |
parent | 46732e6a55a4fd25dc599073598b15bde1c2be15 (diff) |
ffplay: Fix invalid array index
Found-by: Thomas Guilbert <tguilbert@google.com>
Fixes: clusterfuzz_usan-2016-08-02
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 6cd9a8b67a95a136ea15bfe3c3bab6cf5e6d1cc9)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'ffplay.c')
-rw-r--r-- | ffplay.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2936,7 +2936,7 @@ static int read_thread(void *arg) AVStream *st = ic->streams[i]; enum AVMediaType type = st->codecpar->codec_type; st->discard = AVDISCARD_ALL; - if (wanted_stream_spec[type] && st_index[type] == -1) + if (type >= 0 && wanted_stream_spec[type] && st_index[type] == -1) if (avformat_match_stream_specifier(ic, st, wanted_stream_spec[type]) > 0) st_index[type] = i; } |