oggparsedaala: reject too large gpshift
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Tue, 29 Dec 2015 17:32:01 +0000 (18:32 +0100)
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Sat, 2 Jan 2016 11:00:39 +0000 (12:00 +0100)
commitc112be25f7825d14b1c39ccbf325b85883f852c2
treeea3489cf7fe076ed063cd7b3153facd99a2f4fd1
parent69ead86027d04e8f1dacd7b63eb936f62a8e0c6a
oggparsedaala: reject too large gpshift

Also use a unsigned constant for the shift calculation, as 1 << 31 is
undefined for int32_t. This is also fixed oggparsetheora.

This fixes ubsan runtime error: shift exponent is too large for
32-bit type 'int'

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
libavformat/oggparsedaala.c
libavformat/oggparsetheora.c