Cannot create large image
When trying to create a very large image (e.g. 60000x60000), libgd fails with the message:
GD Warning: product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully Segmentation fault (core dumped)
I can imagine this to happen in a 32-bit environment (although a more descriptive message would be useful ...), but it also happens in a 64-bit environment.
I suspect the cause of the problem is that computations for memory allocation are done using int instead of size_t.
I tested this using an application that uses libgd to create a PNG image, on 32-bit and on 64-bit debian testing (with libgd 2.1.0).
I'd appreciate if huge images could be supported on 64-bit architectures in the future.