gdk: Bump the jpeg malloc limit

Bump the limit for memory use during jpeg loading
to 1GB, matching what gdk-pixbuf has for this.
This commit is contained in:
Matthias Clasen 2022-10-31 20:35:15 -04:00
parent 0a6f3944a0
commit 16b95939f9

View File

@ -161,7 +161,8 @@ gdk_load_jpeg (GBytes *input_bytes,
jpeg_create_decompress (&info);
info.mem->max_memory_to_use = 300 * 1024 * 1024;
/* Limit to 1GB to avoid OOM with large images */
info.mem->max_memory_to_use = 1024 * 1024 * 1024;
jpeg_mem_src (&info,
g_bytes_get_data (input_bytes, NULL),