diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-11-22 18:15:09 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-11-22 18:15:12 +0100 |
commit | 9c00f9ada690ff0446cb6299549964ff9436050b (patch) | |
tree | 63f2da18d289e5ccd9b2962d4c80417d80a36495 | |
parent | 9440e4706793e71527fc1e0355e53ace0e227213 (diff) | |
parent | 56c2337004d5223ae03d08020ad3eb4faa1bebc6 (diff) | |
download | ffmpeg-9c00f9ada690ff0446cb6299549964ff9436050b.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
hls: Avoid reading outside of the allocated array
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/hls.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/hls.c b/libavformat/hls.c index 65cd12112d..471a62dc9c 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -724,7 +724,8 @@ start: /* Check if this stream still is on an earlier segment number, or * has the packet with the lowest dts */ if (var->pkt.data) { - struct variant *minvar = c->variants[minvariant]; + struct variant *minvar = minvariant < 0 ? + NULL : c->variants[minvariant]; if (minvariant < 0 || var->cur_seq_no < minvar->cur_seq_no) { minvariant = i; } else if (var->cur_seq_no == minvar->cur_seq_no) { |