diff options
-rw-r--r-- | gdk-pixbuf/io-jpeg.c | 3 |
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; |