summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2022-10-23 18:39:04 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2022-10-23 18:39:04 +0100
commit9f612d4139f2f72a8796342dedd5a0044d4f2237 (patch)
treef2b045f8cbb46c2f7b9118a43c3a7774cf20ee68
parent3b76019515453d219da9b021f30b7dbc8f165540 (diff)
downloadgdk-pixbuf-9f612d4139f2f72a8796342dedd5a0044d4f2237.tar.gz
jpeg: Bump up the memory limit to 1GB
Let's play some more whack-a-mole. Fixes: #218
-rw-r--r--gdk-pixbuf/io-jpeg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdk-pixbuf/io-jpeg.c b/gdk-pixbuf/io-jpeg.c
index 6317e20d3..3841fc01d 100644
--- a/gdk-pixbuf/io-jpeg.c
+++ b/gdk-pixbuf/io-jpeg.c
@@ -1091,7 +1091,8 @@ gdk_pixbuf__jpeg_image_load_increment (gpointer data,
rc = jpeg_read_header (cinfo, TRUE);
context->src_initialized = TRUE;
- cinfo->mem->max_memory_to_use = 300 * 1024 * 1024;
+ /* Limit to 1GB to avoid OOM with large images */
+ cinfo->mem->max_memory_to_use = 1024 * 1024 * 1024;
if (rc == JPEG_SUSPENDED)
continue;