avformat/utils: Prevent undefined shift with wrap_bits > 64.
authorDale Curtis <dalecurtis@chromium.org>
Fri, 17 Nov 2017 21:35:56 +0000 (13:35 -0800)
committerMichael Niedermayer <michael@niedermayer.cc>
Wed, 31 Jan 2018 21:56:14 +0000 (22:56 +0100)
commit2543475730b9c6fcbfe9b0575f959d9c3015a50c
tree37cb4ed8b2c7744ec28ae23f7e6e3b7f1067c4cb
parentcf32c814ed1fc4e3c9e50c85e120b17c59dd6a69
avformat/utils: Prevent undefined shift with wrap_bits > 64.

2LL << (wrap_bits=64 - 1) does not fit in int64_t; change the
code to use a uint64_t (2ULL) and add an av_assert2() to
ensure wrap_bits <= 64.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 03fbc0daa7e37af024f8b017a28105c32bbe25ca)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/utils.c