jpeg: Limit the memory size when loading image data
Specially crafted JPEG images may lead to a crash when their size is too large; in the most benign of cases, the OS might terminate the process after it tries to allocate all the memory in the world.
We can tell libjpeg to limit the size of the memory pool when loading, to avoid this kind of result. For the time being, 100 MB seems like a good threshold.
Original patch by: Sam Ezeh sam.z.ezeh@gmail.com
Fixes: #205 (closed)