Skip to content

Commit

Permalink
fix return value check for HeifPixelImage::crop() (fixes OSS-Fuzz 384…
Browse files Browse the repository at this point in the history
…786941)
  • Loading branch information
farindk committed Dec 18, 2024
1 parent 4b71e45 commit 5aabdab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libheif/image-items/image_item.cc
Original file line number Diff line number Diff line change
Expand Up @@ -846,8 +846,8 @@ Result<std::shared_ptr<HeifPixelImage>> 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;
Expand Down

0 comments on commit 5aabdab

Please sign in to comment.