Dear Maintainer,
When I try to load a .heic photo:
,----
| Memory allocation error: Security limit exceeded: Allocating 599270415
| exceeds the security limit of 536870912 bytes
`----
This is a "security limit" in libheif.
Upstream don't want do fix that.
https://github.com/strukturag/libheif/issues/192
Here is a simple patch to increase this limit from 512 MB to 1GB
,----
| --- a/libheif/security_limits.cc
| +++ b/libheif/security_limits.cc
| @@ -35,7 +35,7 @@ struct heif_security_limits global_secur
| .max_items = 1000,
|
| .max_color_profile_size = 100 * 1024 * 1024, // 100 MB
| - .max_memory_block_size = 512 * 1024 * 1024, // 512 MB
| + .max_memory_block_size = 1024 * 1024 * 1024, // 512 MB
|
| .max_components = 256,
| .max_iloc_extents_per_item = 32,
`----
Christian