bitstream: Avoid undefined behavior in bitstream_skip()
authorLuca Barbato <lu_zero@gentoo.org>
Sat, 8 Jul 2017 19:04:44 +0000 (21:04 +0200)
committerLuca Barbato <lu_zero@gentoo.org>
Sun, 9 Jul 2017 10:56:15 +0000 (12:56 +0200)
commit79f64f7ebc2b2b7030c6219914bc141cc03fd377
treed14d3329e4ff78b6ffedcca63ee0444ef8256e7d
parentfd92dafaff8844b5fedf94679b93d953939a7f7b
bitstream: Avoid undefined behavior in bitstream_skip()

Do not use skip_remaining() to fully wipe the cache, as this could do
a 64-bit shift of a 64-bit variable which is undefined behavior in C.
Instead set the related variables to zero directly.

Thanks to Uoti for pointing out the problem.

CC: libav-stable@libav.org
libavcodec/bitstream.h