avcodec/diracdec: Fix qfactor/offset tables
authorMichael Niedermayer <michael@niedermayer.cc>
Wed, 13 Jan 2016 22:51:47 +0000 (23:51 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 17 Jan 2016 16:28:20 +0000 (17:28 +0100)
commit5fbd97fc756a827f62f556c66272f851cc3c7f90
tree76ea5fc9f2a2f1e863fad8777395aeea28df1ed1
parent69697be92200ff2222f8c59158f35b1771f0c002
avcodec/diracdec: Fix qfactor/offset tables

It seems the previous tables where calculated with 32bit integers ignoring
overflows.
Also check for the max qindex, the value is choosen so that the qfactor/offset
fit in int32.

Fixes: 070b7914fd5dfe8f93248bea71363410/asan_static-oob_c8d034_2764_258e20f4a3c79158aecddb61a833d756.drc
Fixes out of array reads

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/diracdec.c