lavc: check for overflow in init_get_bits
authorLuca Barbato <lu_zero@gentoo.org>
Sun, 13 Jan 2013 18:52:45 +0000 (19:52 +0100)
committerReinhard Tartler <siretart@tauware.de>
Sun, 7 Jul 2013 19:11:34 +0000 (21:11 +0200)
commite6a365b5d2fc8010558ae9a0c3e9749819ad9d45
tree1155a890614f84b9c6db62917185b23b06adbba3
parent0a1d02ca77c9fa9fa089828b2981a659c84c9337
lavc: check for overflow in init_get_bits

Fix an undefined behaviour and make the function return a proper
error in case of overflow.

CC: libav-stable@libav.org
(cherry picked from commit d9cf5f516974c64e01846ca685301014b38cf224)

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit 7a2ee770f520ae4fd5f009cfc361a18e993dec91)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
libavcodec/get_bits.h