From: Matthias Clasen Date: Tue, 1 Nov 2022 00:35:15 +0000 (-0400) Subject: gdk: Bump the jpeg malloc limit X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~9^2~124^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=16b95939f9e1e3d8eb1d2ba8322d6c2d91f0142f;p=gtk4.git gdk: Bump the jpeg malloc limit Bump the limit for memory use during jpeg loading to 1GB, matching what gdk-pixbuf has for this. --- diff --git a/gdk/loaders/gdkjpeg.c b/gdk/loaders/gdkjpeg.c index ba6731ac11..d0520cf9e8 100644 --- a/gdk/loaders/gdkjpeg.c +++ b/gdk/loaders/gdkjpeg.c @@ -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),