From 5aabdab8db270620fd5a5d0976ef486a6bca5493 Mon Sep 17 00:00:00 2001 From: Dirk Farin Date: Wed, 18 Dec 2024 23:48:49 +0100 Subject: [PATCH] fix return value check for HeifPixelImage::crop() (fixes OSS-Fuzz 384786941) --- libheif/image-items/image_item.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libheif/image-items/image_item.cc b/libheif/image-items/image_item.cc index de3d4ce014..e44a6e0313 100644 --- a/libheif/image-items/image_item.cc +++ b/libheif/image-items/image_item.cc @@ -846,8 +846,8 @@ Result> ImageItem::decode_image(const struct hei } auto cropResult = img->crop(left, right, top, bottom, m_heif_context->get_security_limits()); - if (error) { - return error; + if (cropResult.error) { + return cropResult.error; } img = cropResult.value;