Hello!
There is size check in code, that c->tablen = im->bands * im->ysize > INT_MAX.
But 8 * c->tablen can lead to integer overflow. I suggest to adjust the size check.

Found by Linux Verification Center (linuxtesting.org) with SVACE.
Reporter: Dmitriy Karasovsky ([email protected]).