Commit 3b67ae98 for libheif

commit 3b67ae9857eb526dfe83eff764e8e2c54bcaba3c
Author: Dirk Farin <dirk.farin@gmail.com>
Date:   Thu May 28 13:37:56 2026 +0200

    iovl images with no references are invalid according to ISO23008-12

diff --git a/libheif/image-items/overlay.cc b/libheif/image-items/overlay.cc
index 4fe25786..0368ecbf 100644
--- a/libheif/image-items/overlay.cc
+++ b/libheif/image-items/overlay.cc
@@ -244,14 +244,13 @@ Error ImageItem_Overlay::read_overlay_spec()

   m_overlay_image_ids = iref_box->get_references(get_id(), fourcc("dimg"));

-  /* TODO: probably, it is valid that an iovl image has no references ?
-
-  if (image_references.empty()) {
+  // An overlay with no input images is degenerate: ISO/IEC 23008-12 image-overlay
+  // derivation places "one or more" input images onto the canvas.
+  if (m_overlay_image_ids.empty()) {
     return Error(heif_error_Invalid_input,
                  heif_suberror_Missing_grid_images,
-                 "'iovl' image with more than one reference image");
+                 "'iovl' image has no referenced input images");
   }
-  */


   auto overlayDataResult = heif_file->get_uncompressed_item_data(get_id());