Skip to content

Commit

Permalink
Merge pull request #1066 from xiaoxiaoafeifei/master
Browse files Browse the repository at this point in the history
fix null pointer dereference in libheif/uncompressed_image.cc:758
  • Loading branch information
farindk authored Dec 14, 2023
2 parents 56ef61d + fd5b02a commit 355be44
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libheif/uncompressed_image.cc
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,13 @@ Error UncompressedImageCodec::decode_uncompressed_image(const std::shared_ptr<co
if (error) {
return error;
}

if (!(uncompressed_data.data())) {
return Error(heif_error_Invalid_input,
heif_suberror_Unspecified,
"Invalid data: uncompressed_data.data() is null for uncompressed codec");
}

uint32_t width = 0;
uint32_t height = 0;
bool found_ispe = false;
Expand Down

0 comments on commit 355be44

Please sign in to comment.