summary refs log tree commit diff
path: root/pkgs/development/libraries/libheif/1.4.0-CVE-2019-11471.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/libheif/1.4.0-CVE-2019-11471.patch')
-rw-r--r--pkgs/development/libraries/libheif/1.4.0-CVE-2019-11471.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/pkgs/development/libraries/libheif/1.4.0-CVE-2019-11471.patch b/pkgs/development/libraries/libheif/1.4.0-CVE-2019-11471.patch
new file mode 100644
index 00000000000..2ea1b124ce7
--- /dev/null
+++ b/pkgs/development/libraries/libheif/1.4.0-CVE-2019-11471.patch
@@ -0,0 +1,15 @@
+Adapted from upstream commit 995a4283d8ed2d0d2c1ceb1a577b993df2f0e014
+--- a/libheif/heif_context.cc
++++ b/libheif/heif_context.cc
+@@ -571,6 +571,11 @@
+             image->set_is_alpha_channel_of(refs[0]);
+ 
+             auto master_iter = m_all_images.find(refs[0]);
++            if (master_iter == m_all_images.end()) {
++              return Error(heif_error_Invalid_input,
++                           heif_suberror_Nonexisting_item_referenced,
++                           "Non-existing alpha image referenced");
++            }
+             master_iter->second->set_alpha_channel(image);
+           }
+