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)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 5 May 2015 19:52:31 +0000 (21:52 +0200)
commit984f50deb2d48f6844d65e10991b996a6d29e87c
tree68a72b43c7ceee51ab08056886c3eab577356abf
parented68fccf76b489c64814a481bee16ac7fe717c24
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>
libavcodec/diracdec.c