summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gmail.com>2022-10-25 16:05:37 +0000
committerEmmanuele Bassi <ebassi@gmail.com>2022-10-25 16:05:37 +0000
commitf4a954c2eadde0b7de72e25f5ac331b6a1047864 (patch)
treef2b045f8cbb46c2f7b9118a43c3a7774cf20ee68
parent3b76019515453d219da9b021f30b7dbc8f165540 (diff)
parent9f612d4139f2f72a8796342dedd5a0044d4f2237 (diff)
downloadgdk-pixbuf-f4a954c2eadde0b7de72e25f5ac331b6a1047864.tar.gz
Merge branch 'ebassi/issue-218' into 'master'
jpeg: Bump up the memory limit to 1GB Closes #218 See merge request GNOME/gdk-pixbuf!147
-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;