Source: libheif1
Version: 1.19.5-1+b1
Severity: normal

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


-- System Information:
Debian Release: trixie/sid
  APT prefers buildd-unstable
  APT policy: (500, 'buildd-unstable'), (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.12.13-1-custom (SMP w/24 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_OOT_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

-- no debconf information

Reply via email to