mov: Fix negative size calculation in mov_read_default().
authorDale Curtis <dalecurtis@chromium.org>
Tue, 6 Jan 2015 00:34:17 +0000 (16:34 -0800)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 13 Mar 2015 16:06:08 +0000 (17:06 +0100)
commit3eee7e0db60dc2d3756bde814f21f3df72eb0b0b
tree1da46e17cdcc26fe48da8c99a6d10baec5853002
parente2e66f2f998242c7a9342df6d68f9a98fda774c9
mov: Fix negative size calculation in mov_read_default().

The previous code assumed if an atom was marked with a 64-bit
size extension, it actually had that data available. The new
code verfies there's enough data in the atom for this to be
done.

Failure to verify causes total_size > atom.size which will
result in negative size calculations later on.

Found-by: Paul Mehta <paul@paulmehta.com>
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3ebd76a9c57558e284e94da367dd23b435e6a6d0)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/mov.c