projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0a6f394
)
gdk: Bump the jpeg malloc limit
author
Matthias Clasen
<mclasen@redhat.com>
Tue, 1 Nov 2022 00:35:15 +0000
(20:35 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Tue, 1 Nov 2022 00:35:15 +0000
(20:35 -0400)
Bump the limit for memory use during jpeg loading
to 1GB, matching what gdk-pixbuf has for this.
gdk/loaders/gdkjpeg.c
patch
|
blob
|
history
diff --git
a/gdk/loaders/gdkjpeg.c
b/gdk/loaders/gdkjpeg.c
index ba6731ac1112dbe7574167d1b4cb5e0eef417d1e..d0520cf9e8224f199e3710eef781abf77adf257a 100644
(file)
--- 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),