diracdec: avoid overflow of bytes*8 in decode_lowdelay
authorAndreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Tue, 5 May 2015 20:10:44 +0000 (22:10 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 5 May 2015 22:28:52 +0000 (00:28 +0200)
commit9e66b39aa87eb653a6e5d15f70b792ccbf719de7
treef2dd47872ffcf4514c3040fe27ed7bb6053bdb74
parentaf6739d6daf747778996c832a1d8b933cab03dd3
diracdec: avoid overflow of bytes*8 in decode_lowdelay

If bytes is large enough, bytes*8 can overflow and become negative.

In that case 'bufsize -= bytes*8' causes bufsize to increase instead of
decrease.

This leads to a segmentation fault.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/diracdec.c