Skip to content

Commit

Permalink
fix reading images where 'meta' box comes after 'mbox'
Browse files Browse the repository at this point in the history
  • Loading branch information
farindk committed Sep 16, 2024
1 parent 9306e52 commit bb3b652
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libheif/file_layout.cc
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Error FileLayout::read(const std::shared_ptr<StreamReader>& stream)
// TODO: overflow
uint64_t next_box_header_end = next_box_start + MAXIMUM_BOX_HEADER_SIZE;
if (next_box_header_end > m_max_length) {
m_max_length = stream->request_range(next_box_start, MAXIMUM_BOX_HEADER_SIZE);
m_max_length = stream->request_range(next_box_start, next_box_header_end);
}

if (next_box_header_end > m_max_length) {
Expand Down

0 comments on commit bb3b652

Please sign in to comment.