openjp3d: Int overflow fixed (#1159)
authorichlubna <43234438+ichlubna@users.noreply.github.com>
Fri, 16 Nov 2018 08:40:31 +0000 (09:40 +0100)
committerEven Rouault <even.rouault@mines-paris.org>
Fri, 16 Nov 2018 08:40:31 +0000 (09:40 +0100)
commitc196b23b90321b5c7e3238294607a2e8626c503f
tree8ca93ad9c5f6fef6bc7aeb415f67c09e9bdf8c6f
parent948332e6ed17565100d1df5f6fdbf66865218e36
openjp3d: Int overflow fixed (#1159)

When compressing a lot of slices (starting from 44 FullHD slices with 3 8bit components in our experiments) the rate values are high enough to cause an int overflow that leads to negative lengths and wrong results. The cast happens too late.
src/lib/openjp3d/tcd.c