diracdec: prevent overflow in data_unit_size check
authorAndreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Tue, 5 May 2015 19:33:08 +0000 (21:33 +0200)
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Thu, 14 May 2015 17:10:06 +0000 (19:10 +0200)
commitf78d7e6a03147f918033146afbf17e96d66d1cce
tree57ad12922058c66a1c717c2676125029e97120a4
parent0cb8d786f29c1cac6639ae7d84f5af40553793b4
diracdec: prevent overflow in data_unit_size check

buf_idx + data_unit_size can overflow, causing the '> buf_size' check to
wrongly fail.

This causes a segmentation fault.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 984f50deb2d48f6844d65e10991b996a6d29e87c)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
libavcodec/diracdec.c