Skip to content

Commit

Permalink
Ensure max_size_entity_group security limit is enforced
Browse files Browse the repository at this point in the history
lovell committed Jan 14, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 2b736bf commit b44c4ec
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libheif/box.cc
Original file line number Diff line number Diff line change
@@ -3849,6 +3849,9 @@ Error Box_EntityToGroup::parse(BitstreamRange& range, const heif_security_limits
std::stringstream sstr;
sstr << "entity group box contains " << nEntities << " entities, but the security limit is set to " << limits->max_size_entity_group << " entities.";

return {heif_error_Invalid_input,
heif_suberror_End_of_data,
sstr.str()};
}

entity_ids.resize(nEntities);

0 comments on commit b44c4ec

Please sign in to comment.