Skip to content

Commit

Permalink
return istream error while reading hvcC
Browse files Browse the repository at this point in the history
  • Loading branch information
farindk committed Oct 24, 2023
1 parent 316291a commit aa9222b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libheif/hevc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@ Error Box_hvcC::parse(BitstreamRange& range)
if (range.prepare_read(size)) {
nal_unit.resize(size);
bool success = range.get_istream()->read((char*) nal_unit.data(), size);
assert(success);
(void) success;
if (!success) {
return Error{heif_error_Invalid_input, heif_suberror_End_of_data, "error while reading hvcC box"};
}
}

array.m_nal_units.push_back(std::move(nal_unit));
Expand Down

0 comments on commit aa9222b

Please sign in to comment.