Much appreciated, thanks!
Actually, (height-1) * pitchmight also overflow, so they should also be size_t.
Calling FreeImage_Paste fails on very large images
Fix here: https://sourceforge.net/p/freeimage/patches/148/
Bugfix for #340 (Calling FreeImage_Paste fails on very large images)
Obviously the title of this ticket is wrong and should read Calling FreeImage_Paste fails on very large images.
Incorrect loading of of large (30000 x 15000) exr files
Hi Mihail! memcpy(Mid, From + line_s, pitch); memcpy(From + line_s, From + line_t, pitch); memcpy(From + line_t, Mid, pitch); For example if the sum of From and line_s is greater than INT_MAX, memcopy receives a negative offset. Which explains the result outlined in the bug report. Only line_s and line_t really need to be of type size_t. (the above anonymous post is mine)