diff options
Diffstat (limited to 'gdk-pixbuf')
-rw-r--r-- | gdk-pixbuf/io-jpeg.c | 3 | ||||
-rw-r--r-- | gdk-pixbuf/meson.build | 1 |
2 files changed, 3 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; diff --git a/gdk-pixbuf/meson.build b/gdk-pixbuf/meson.build index 54ff9dda3..a11926eee 100644 --- a/gdk-pixbuf/meson.build +++ b/gdk-pixbuf/meson.build @@ -272,6 +272,7 @@ gdkpixbuf_dep = declare_dependency( dependencies: gdk_pixbuf_deps, sources: [ gdkpixbuf_enum_h, built_girs ], ) +meson.override_dependency('gdk-pixbuf-2.0', gdkpixbuf_dep) # Now check if we are building loaders as installed shared modules # We do this here because shared modules depend on libgdk-pixbuf |