hitoshura25/cvefixes huggingface dataset:
CVE-2016-10267 (Other, published 2017-03-24T19:59Z)
Description: value: LibTIFF 4.0.7 allows remote attackers to cause a denial of service (divide-by-zero error and application crash) via a crafted TIFF image, related to libtiff/tif_ojpeg.c:816:8.
Severity: MEDIUM (CVSS v3 base score: 5.5)
Weakness: CWE-369 \u2014 Divide By Zero
The product divides a value by zero.
Repository: https://github.com/vadz/libtiff
Files changed:
ChangeLog
libtiff/tif_ojpeg.c
Commit message: * libtiff/tif_ojpeg.c: make OJPEGDecode() early exit in case of failure in
OJPEGPreDecode(). This will avoid a divide by zero, and potential other issues.
Reported by Agostino Sarubbo.
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2611


Vulnerable code:

Fixed code:
2016-12-03 Even Rouault <even.rouault at spatialys.com>

	* libtiff/tif_ojpeg.c: make OJPEGDecode() early exit in case of failure in
	OJPEGPreDecode(). This will avoid a divide by zero, and potential other issues.
	Reported by Agostino Sarubbo.
	Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2611

        int decoder_ok;
	sp->decoder_ok = 1;
        static const char module[]="OJPEGDecode";
        if( !sp->decoder_ok )
        {
            TIFFErrorExt(tif->tif_clientdata,module,"Cannot decode: decoder not correctly initialized");
            return 0;
        }
CVE-2016-10268 (Other, published 2017-03-24T19:59Z)
Description: value: tools/tiffcp.c in LibTIFF 4.0.7 allows remote attackers to cause a denial of service (integer underflow and heap-based buffer under-read) or possibly have unspecified other impact via a crafted TIFF image, related to "READ of size 78490" and libtiff/tif_unix.c:115:23.
Severity: MEDIUM (CVSS v3 base score: 7.8)
Weakness: CWE-191 \u2014 Integer Underflow (Wrap or Wraparound)
The product subtracts one value from another, such that the result is less than the minimum allowable integer value, which produces a value that is not equal to the correct result.
Repository: https://github.com/vadz/libtiff
Files changed:
ChangeLog
tools/tiffcp.c
Commit message: * tools/tiffcp.c: avoid uint32 underflow in cpDecodedStrips that
can cause various issues, such as buffer overflows in the library.
Reported by Agostino Sarubbo.
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2598


Vulnerable code:
		for (s = 0; s < ns; s++) {

Fixed code:
2016-12-02 Even Rouault <even.rouault at spatialys.com>

	* tools/tiffcp.c: avoid uint32 underflow in cpDecodedStrips that 
	can cause various issues, such as buffer overflows in the library.
	Reported by Agostino Sarubbo.
	Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2598

		for (s = 0; s < ns && row < imagelength; s++) {
CVE-2016-10269 (C, published 2017-03-24T19:59Z)
Description: value: LibTIFF 4.0.0alpha4, 4.0.0alpha5, 4.0.0alpha6, 4.0.0beta7, 4.0.0, 4.0.1, 4.0.2, 4.0.3, 4.0.4, 4.0.4beta, 4.0.5, 4.0.6 and 4.0.7 allows remote attackers to cause a denial of service (heap-based buffer over-read) or possibly have unspecified other impact via a crafted TIFF image, related to "READ of size 512" and libtiff/tif_unix.c:340:2.
Severity: MEDIUM (CVSS v3 base score: 7.8)
Weakness: CWE-125 \u2014 Out-of-bounds Read
The product reads data past the end, or before the beginning, of the intended buffer.
Repository: https://github.com/vadz/libtiff
Files changed:
ChangeLog
libtiff/tif_luv.c
libtiff/tif_pixarlog.c
Commit message: * libtiff/tif_pixarlog.c, libtiff/tif_luv.c: fix heap-based buffer
overflow on generation of PixarLog / LUV compressed files, with
ColorMap, TransferFunction attached and nasty plays with bitspersample.
The fix for LUV has not been tested, but suffers from the same kind
of issue of PixarLog.
Reported by Agostino Sarubbo.
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2604


Vulnerable code:
	td->td_samplesperpixel =
	    (td->td_photometric == PHOTOMETRIC_LOGL) ? 1 : 3;
	td->td_bitspersample = 16;
	td->td_sampleformat = SAMPLEFORMAT_INT;
	td->td_bitspersample = 8;
	td->td_sampleformat = SAMPLEFORMAT_UINT;

Fixed code:
2016-12-03 Even Rouault <even.rouault at spatialys.com>

	* libtiff/tif_pixarlog.c, libtiff/tif_luv.c: fix heap-based buffer
	overflow on generation of PixarLog / LUV compressed files, with
	ColorMap, TransferFunction attached and nasty plays with bitspersample.
	The fix for LUV has not been tested, but suffers from the same kind
	of issue of PixarLog.
	Reported by Agostino Sarubbo.
	Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2604

        int                     encoder_state;  /* 1 if encoder correctly initialized */
	sp->encoder_state = 1;
        LogLuvState* sp = (LogLuvState*) tif->tif_data;
	assert(sp != 0);
         * Note: this is really a nasty approach. See PixarLogClose
        if( sp->encoder_state )
        {
            /* See PixarLogClose. Might avoid issues with tags whose size depends
             * on those below, but not completely sure this is enough. */
            td->td_samplesperpixel =
                (td->td_photometric == PHOTOMETRIC_LOGL) ? 1 : 3;
            td->td_bitspersample = 16;
            td->td_sampleformat = SAMPLEFORMAT_INT;
        }
        PixarLogState* sp = (PixarLogState*) tif->tif_data;
	assert(sp != 0);

        if (sp->state&PLSTATE_INIT) {
            /* We test the state to avoid an issue such as in
             * http://bugzilla.maptools.org/show_bug.cgi?id=2604
             * What appends in that case is that the bitspersample is 1 and
             * a TransferFunction is set. The size of the TransferFunction
             * depends on 1<<bitspersample. So if we increase it, an access
             * out of the buffer will happen at directory flushing.
             * Another option would be to clear those targs. 
             */
            td->td_bitspersample = 8;
            td->td_sampleformat = SAMPLEFORMAT_UINT;
        }
CVE-2016-10271 (Other, published 2017-03-24T19:59Z)
Description: value: tools/tiffcrop.c in LibTIFF 4.0.7 allows remote attackers to cause a denial of service (heap-based buffer over-read and buffer overflow) or possibly have unspecified other impact via a crafted TIFF image, related to "READ of size 1" and libtiff/tif_fax3.c:413:13.
Severity: MEDIUM (CVSS v3 base score: 7.8)
Weakness: CWE-119 \u2014 Improper Restriction of Operations within the Bounds of a Memory Buffer
The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.
Repository: https://github.com/vadz/libtiff
Files changed:
ChangeLog
tools/tiffcrop.c
Commit message: * tools/tiffcrop.c: fix readContigStripsIntoBuffer() in -i (ignore) mode so
that the output buffer is correctly incremented to avoid write outside bounds.
Reported by Agostino Sarubbo.
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2620


Vulnerable code:
                bufp += bytes_read;

Fixed code:
2016-12-03 Even Rouault <even.rouault at spatialys.com>

	* tools/tiffcrop.c: fix readContigStripsIntoBuffer() in -i (ignore) mode so
	that the output buffer is correctly incremented to avoid write outside bounds.
	Reported by Agostino Sarubbo.
	Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2620

                bufp += stripsize;
CVE-2016-10272 (Other, published 2017-03-24T19:59Z)
Description: value: LibTIFF 4.0.7 allows remote attackers to cause a denial of service (heap-based buffer overflow) or possibly have unspecified other impact via a crafted TIFF image, related to "WRITE of size 2048" and libtiff/tif_next.c:64:9.
Severity: MEDIUM (CVSS v3 base score: 7.8)
Weakness: CWE-119 \u2014 Improper Restriction of Operations within the Bounds of a Memory Buffer
The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.
Repository: https://github.com/vadz/libtiff
Files changed:
ChangeLog
tools/tiffcrop.c
Commit message: * tools/tiffcrop.c: fix readContigStripsIntoBuffer() in -i (ignore) mode so
that the output buffer is correctly incremented to avoid write outside bounds.
Reported by Agostino Sarubbo.
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2620


Vulnerable code:
                bufp += bytes_read;

Fixed code:
2016-12-03 Even Rouault <even.rouault at spatialys.com>

	* tools/tiffcrop.c: fix readContigStripsIntoBuffer() in -i (ignore) mode so
	that the output buffer is correctly incremented to avoid write outside bounds.
	Reported by Agostino Sarubbo.
	Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2620

                bufp += stripsize;
CVE-2016-5314 (Other, published 2018-03-12T02:29Z)
Description: value: Buffer overflow in the PixarLogDecode function in tif_pixarlog.c in LibTIFF 4.0.6 and earlier allows remote attackers to cause a denial of service (application crash) or possibly have unspecified other impact via a crafted TIFF image, as demonstrated by overwriting the vgetparent function pointer with rgb2ycbcr.
Severity: MEDIUM (CVSS v3 base score: 8.8)
Weakness: CWE-787 \u2014 Out-of-bounds Write
The product writes data past the end, or before the beginning, of the intended buffer.
Repository: https://github.com/vadz/libtiff
Files changed:
ChangeLog
libtiff/tif_pixarlog.c
Commit message: * libtiff/tif_pixarlog.c: fix potential buffer write overrun in
PixarLogDecode() on corrupted/unexpected images (reported by Mathias Svensson)


Vulnerable code:

Fixed code:
2016-06-28  Even Rouault <even.rouault at spatialys.com>

	* libtiff/tif_pixarlog.c: fix potential buffer write overrun in
	PixarLogDecode() on corrupted/unexpected images (reported by Mathias Svensson)

	tmsize_t		tbuf_size; /* only set/used on reading for now */
	sp->tbuf_size = tbuf_size;
	/* Check that we will not fill more than what was allocated */
	if (sp->stream.avail_out > sp->tbuf_size)
	{
		TIFFErrorExt(tif->tif_clientdata, module, "sp->stream.avail_out > sp->tbuf_size");
		return (0);
	}
CVE-2016-9535 (Other, published 2016-11-22T19:59Z)
Description: value: tif_predict.h and tif_predict.c in libtiff 4.0.6 have assertions that can lead to assertion failures in debug mode, or buffer overflows in release mode, when dealing with unusual tile size like YCbCr with subsampling. Reported as MSVR 35105, aka "Predictor heap-buffer-overflow."
Severity: HIGH (CVSS v3 base score: 9.8)
Weakness: CWE-119 \u2014 Improper Restriction of Operations within the Bounds of a Memory Buffer
The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.
Repository: https://github.com/vadz/libtiff
Files changed:
ChangeLog
libtiff/tif_predict.c
Commit message: * libtiff/tif_predic.c: fix memory leaks in error code paths added in
previous commit (fix for MSVR 35105)


Vulnerable code:
	uint8 *tmp = (uint8 *)_TIFFmalloc(cc);
	uint8 *tmp = (uint8 *)_TIFFmalloc(cc);

Fixed code:
2016-11-04 Even Rouault <even.rouault at spatialys.com>

	* libtiff/tif_predic.c: fix memory leaks in error code paths added in
	previous commit (fix for MSVR 35105)

	uint8 *tmp;
    tmp = (uint8 *)_TIFFmalloc(cc);
	uint8 *tmp;

    tmp = (uint8 *)_TIFFmalloc(cc);
        _TIFFfree( working_copy );
CVE-2016-9538 (C, published 2016-11-22T19:59Z)
Description: value: tools/tiffcrop.c in libtiff 4.0.6 reads an undefined buffer in readContigStripsIntoBuffer() because of a uint16 integer overflow. Reported as MSVR 35100.
Severity: HIGH (CVSS v3 base score: 9.8)
Weakness: CWE-190 \u2014 Integer Overflow or Wraparound
The product performs a calculation that can
         produce an integer overflow or wraparound when the logic
         assumes that the resulting value will always be larger than
         the original value. This occurs when an integer value is
         incremented to a value that is too large to store in the
         associated representation. When this occurs, the value may
         become a very small or negative number.
Repository: https://github.com/vadz/libtiff
Files changed:
ChangeLog
tools/tiffcp.c
tools/tiffcrop.c
Commit message: * tools/tiffcp.c: fix read of undefined variable in case of missing
required tags. Found on test case of MSVR 35100.
* tools/tiffcrop.c: fix read of undefined buffer in
readContigStripsIntoBuffer() due to uint16 overflow. Probably not a
security issue but I can be wrong. Reported as MSVR 35100 by Axel
Souchet from the MSRC Vulnerabilities & Mitigations team.


Vulnerable code:
	uint16 bitspersample, samplesperpixel;
	uint16 input_compression, input_photometric;
        uint16 strip, nstrips   = TIFFNumberOfStrips(in);
  int i, j, bytes_per_sample, bytes_per_pixel, shift_width, result = 1;
  uint16 bps, nstrips, planar, strips_per_sample;

Fixed code:
2016-10-08 Even Rouault <even.rouault at spatialys.com>

	* tools/tiffcp.c: fix read of undefined variable in case of missing
	required tags. Found on test case of MSVR 35100.
	* tools/tiffcrop.c: fix read of undefined buffer in
	readContigStripsIntoBuffer() due to uint16 overflow. Probably not a
	security issue but I can be wrong. Reported as MSVR 35100 by Axel
	Souchet from the MSRC Vulnerabilities & Mitigations team.

	uint16 bitspersample, samplesperpixel = 1;
	uint16 input_compression, input_photometric = PHOTOMETRIC_MINISBLACK;
        uint32 strip, nstrips   = TIFFNumberOfStrips(in);
  int i, bytes_per_sample, bytes_per_pixel, shift_width, result = 1;
  uint32 j;
  uint16 bps, planar;
  uint32 nstrips;
  uint32 strips_per_sample;
CVE-2016-9539 (Other, published 2016-11-22T19:59Z)
Description: value: tools/tiffcrop.c in libtiff 4.0.6 has an out-of-bounds read in readContigTilesIntoBuffer(). Reported as MSVR 35092.
Severity: HIGH (CVSS v3 base score: 9.8)
Weakness: CWE-119 \u2014 Improper Restriction of Operations within the Bounds of a Memory Buffer
The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.
Repository: https://github.com/vadz/libtiff
Files changed:
ChangeLog
tools/tiffcrop.c
Commit message: * tools/tiffcrop.c: fix out-of-bound read of up to 3 bytes in
readContigTilesIntoBuffer(). Reported as MSVR 35092 by Axel Souchet
& Vishal Chauhan from the MSRC Vulnerabilities & Mitigations team.


Vulnerable code:
  tilebuf = _TIFFmalloc(tile_buffsize);

Fixed code:
2016-10-14 Even Rouault <even.rouault at spatialys.com>

	* tools/tiffcrop.c: fix out-of-bound read of up to 3 bytes in
	readContigTilesIntoBuffer(). Reported as MSVR 35092 by Axel Souchet
	& Vishal Chauhan from the MSRC Vulnerabilities & Mitigations team.

  /* Add 3 padding bytes for extractContigSamplesShifted32bits */
  if( tile_buffsize > 0xFFFFFFFFU - 3 )
  {
      TIFFError("readContigTilesIntoBuffer", "Integer overflow when calculating buffer size.");
      exit(-1);
  }
  tilebuf = _TIFFmalloc(tile_buffsize + 3);
  tilebuf[tile_buffsize] = 0;
  tilebuf[tile_buffsize+1] = 0;
  tilebuf[tile_buffsize+2] = 0;
CVE-2016-9539 (Other, published 2016-11-22T19:59Z)
Description: value: tools/tiffcrop.c in libtiff 4.0.6 has an out-of-bounds read in readContigTilesIntoBuffer(). Reported as MSVR 35092.
Severity: HIGH (CVSS v3 base score: 9.8)
Weakness: CWE-125 \u2014 Out-of-bounds Read
The product reads data past the end, or before the beginning, of the intended buffer.
Repository: https://github.com/vadz/libtiff
Files changed:
ChangeLog
tools/tiffcrop.c
Commit message: * tools/tiffcrop.c: fix out-of-bound read of up to 3 bytes in
readContigTilesIntoBuffer(). Reported as MSVR 35092 by Axel Souchet
& Vishal Chauhan from the MSRC Vulnerabilities & Mitigations team.


Vulnerable code:
  tilebuf = _TIFFmalloc(tile_buffsize);

Fixed code:
2016-10-14 Even Rouault <even.rouault at spatialys.com>

	* tools/tiffcrop.c: fix out-of-bound read of up to 3 bytes in
	readContigTilesIntoBuffer(). Reported as MSVR 35092 by Axel Souchet
	& Vishal Chauhan from the MSRC Vulnerabilities & Mitigations team.

  /* Add 3 padding bytes for extractContigSamplesShifted32bits */
  if( tile_buffsize > 0xFFFFFFFFU - 3 )
  {
      TIFFError("readContigTilesIntoBuffer", "Integer overflow when calculating buffer size.");
      exit(-1);
  }
  tilebuf = _TIFFmalloc(tile_buffsize + 3);
  tilebuf[tile_buffsize] = 0;
  tilebuf[tile_buffsize+1] = 0;
  tilebuf[tile_buffsize+2] = 0;
CVE-2016-9540 (Other, published 2016-11-22T19:59Z)
Description: value: tools/tiffcp.c in libtiff 4.0.6 has an out-of-bounds write on tiled images with odd tile width versus image width. Reported as MSVR 35103, aka "cpStripToTile heap-buffer-overflow."
Severity: HIGH (CVSS v3 base score: 9.8)
Weakness: CWE-119 \u2014 Improper Restriction of Operations within the Bounds of a Memory Buffer
The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.
Repository: https://github.com/vadz/libtiff
Files changed:
ChangeLog
tools/tiffcp.c
Commit message: * tools/tiffcp.c: fix out-of-bounds write on tiled images with odd
tile width vs image width. Reported as MSVR 35103
by Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities &
Mitigations team.


Vulnerable code:
		for (col = 0; col < imagewidth; col += tw) {
		for (col = 0; col < imagewidth; col += tw) {

Fixed code:
2016-10-08 Even Rouault <even.rouault at spatialys.com>

	* tools/tiffcp.c: fix out-of-bounds write on tiled images with odd
	tile width vs image width. Reported as MSVR 35103
	by Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities &
	Mitigations team.

		for (col = 0; col < imagewidth && colb < imagew; col += tw) {
		for (col = 0; col < imagewidth && colb < imagew; col += tw) {
CVE-2016-9540 (Other, published 2016-11-22T19:59Z)
Description: value: tools/tiffcp.c in libtiff 4.0.6 has an out-of-bounds write on tiled images with odd tile width versus image width. Reported as MSVR 35103, aka "cpStripToTile heap-buffer-overflow."
Severity: HIGH (CVSS v3 base score: 9.8)
Weakness: CWE-787 \u2014 Out-of-bounds Write
The product writes data past the end, or before the beginning, of the intended buffer.
Repository: https://github.com/vadz/libtiff
Files changed:
ChangeLog
tools/tiffcp.c
Commit message: * tools/tiffcp.c: fix out-of-bounds write on tiled images with odd
tile width vs image width. Reported as MSVR 35103
by Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities &
Mitigations team.


Vulnerable code:
		for (col = 0; col < imagewidth; col += tw) {
		for (col = 0; col < imagewidth; col += tw) {

Fixed code:
2016-10-08 Even Rouault <even.rouault at spatialys.com>

	* tools/tiffcp.c: fix out-of-bounds write on tiled images with odd
	tile width vs image width. Reported as MSVR 35103
	by Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities &
	Mitigations team.

		for (col = 0; col < imagewidth && colb < imagew; col += tw) {
		for (col = 0; col < imagewidth && colb < imagew; col += tw) {
CVE-2017-5225 (Other, published 2017-01-12T11:59Z)
Description: value: LibTIFF version 4.0.7 is vulnerable to a heap buffer overflow in the tools/tiffcp resulting in DoS or code execution via a crafted BitsPerSample value.
Severity: HIGH (CVSS v3 base score: 9.8)
Weakness: CWE-119 \u2014 Improper Restriction of Operations within the Bounds of a Memory Buffer
The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.
Repository: https://github.com/vadz/libtiff
Files changed:
ChangeLog
tools/tiffcp.c
Commit message: * tools/tiffcp.c: error out cleanly in cpContig2SeparateByRow and
cpSeparate2ContigByRow if BitsPerSample != 8 to avoid heap based overflow.
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2656 and
http://bugzilla.maptools.org/show_bug.cgi?id=2657


Vulnerable code:
	uint16 bitspersample, samplesperpixel = 1;
	(void) TIFFGetField(in, TIFFTAG_PLANARCONFIG, &shortv);

Fixed code:
2017-01-11 Even Rouault <even.rouault at spatialys.com>

	* tools/tiffcp.c: error out cleanly in cpContig2SeparateByRow and
	cpSeparate2ContigByRow if BitsPerSample != 8 to avoid heap based overflow.
	Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2656 and
	http://bugzilla.maptools.org/show_bug.cgi?id=2657

	uint16 bitspersample = 1, samplesperpixel = 1;
        uint16 bps = 0;

        (void) TIFFGetField(in, TIFFTAG_BITSPERSAMPLE, &bps);
        if( bps != 8 )
        {
            TIFFError(TIFFFileName(in),
                      "Error, can only handle BitsPerSample=8 in %s",
                      "cpContig2SeparateByRow");
            return 0;
        }
        uint16 bps = 0;

        (void) TIFFGetField(in, TIFFTAG_BITSPERSAMPLE, &bps);
        if( bps != 8 )
        {
            TIFFError(TIFFFileName(in),
                      "Error, can only handle BitsPerSample=8 in %s",
                      "cpSeparate2ContigByRow");
            return 0;
        }
	(void) TIFFGetFieldDefaulted(in, TIFFTAG_PLANARCONFIG, &shortv);
CVE-2019-11471 (C++, published 2019-04-23T14:29Z)
Description: value: libheif 1.4.0 has a use-after-free in heif::HeifContext::Image::set_alpha_channel in heif_context.h because heif_context.cc mishandles references to non-existing alpha images.
Severity: MEDIUM (CVSS v3 base score: 8.8)
Weakness: CWE-416 \u2014 Use After Free
The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer.
Repository: https://github.com/strukturag/libheif
Files changed:
libheif/heif_context.cc
Commit message: Detect non-existing referenced alpha images (fixes #123)


Vulnerable code:

Fixed code:
            if (master_iter == m_all_images.end()) {
              return Error(heif_error_Invalid_input,
                           heif_suberror_Nonexisting_item_referenced,
                           "Non-existing alpha image referenced");
            }