Bug 1407833 - update rust mp4 parser for add overflow. r=kinetik

MozReview-Commit-ID: 8nGLWcXmGCr

--HG--
extra : rebase_source : 36452e27c7a6d9488164defa03f7eea281ddeef3
This commit is contained in:
Alfredo.Yang 2017-11-01 14:48:15 +08:00
Родитель ff91e4857a
Коммит 0dd9f867bb
2 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -841,7 +841,10 @@ impl<'a> Iterator for SampleToChunkIterator<'a> {
self.sample_count = next.samples_per_chunk;
// Total chunk number in 'stsc' could be different to 'stco',
// there could be more chunks at the last 'stsc' record.
((next.first_chunk - 1) .. next.first_chunk + self.remain_chunk_count -1)
match next.first_chunk.checked_add(self.remain_chunk_count) {
Some(r) => ((next.first_chunk - 1) .. r - 1),
_ => (0 .. 0),
}
},
_ => (0 .. 0),
};

Просмотреть файл

@ -2,7 +2,7 @@
# Script to update mp4parse-rust sources to latest upstream
# Default version.
VER=7a10a8349b7dc098210deb0872de801e30f2d65e
VER=cfeeab0036e14658f28f8df16c7ddede46ccf79a
# Accept version or commit from the command line.
if test -n "$1"; then