diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-08-03 13:15:14 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-08-03 16:09:03 +0200 |
commit | 6cd9a8b67a95a136ea15bfe3c3bab6cf5e6d1cc9 (patch) | |
tree | 573d6a5d535420dfd84971f8a0e50c2329066591 | |
parent | 8916ad956a1e9093a935be133b38d0e367c0aee5 (diff) | |
download | ffmpeg-6cd9a8b67a95a136ea15bfe3c3bab6cf5e6d1cc9.tar.gz |
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>
-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; } |