Skip to content
Permalink
Browse files

Detect non-existing referenced alpha images (fixes #123)

  • Loading branch information...
fancycode committed Apr 15, 2019
1 parent dcbfa77 commit 995a4283d8ed2d0d2c1ceb1a577b993df2f0e014
Showing with 5 additions and 0 deletions.
  1. BIN fuzzing/corpus/uaf_heif_context.h_117_1.heic
  2. +5 −0 libheif/heif_context.cc
Binary file not shown.
@@ -576,6 +576,11 @@ Error HeifContext::interpret_heif_file()
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");
}
if (image.get() == master_iter->second.get()) {
return Error(heif_error_Invalid_input,
heif_suberror_Nonexisting_item_referenced,

0 comments on commit 995a428

Please sign in to comment.
You can’t perform that action at this time.