diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-11-22 21:15:09 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-11-22 21:15:12 +0400 |
commit | 9c00f9ada690ff0446cb6299549964ff9436050b (patch) | |
tree | 63f2da18d289e5ccd9b2962d4c80417d80a36495 /libavformat/hls.c | |
parent | 9440e4706793e71527fc1e0355e53ace0e227213 (diff) | |
parent | 56c2337004d5223ae03d08020ad3eb4faa1bebc6 (diff) |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
hls: Avoid reading outside of the allocated array
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/hls.c')
-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) { |