Skip to content

Commit

Permalink
fix double iref references check (fixes #983)
Browse files Browse the repository at this point in the history
  • Loading branch information
farindk committed Oct 13, 2023
1 parent 55dfd3d commit f9906dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libheif/box.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2617,12 +2617,12 @@ Error Box_iref::parse(BitstreamRange& range)
"Number of iref references exceeds security limit.");
}

// --- check for cyclic references
// --- check for duplicate references

for (const auto& ref : m_references) {
std::set<heif_item_id> to_ids;
for (const auto to_id : ref.to_item_ID) {
if (to_ids.find(to_id) != to_ids.end()) {
if (to_ids.find(to_id) == to_ids.end()) {
to_ids.insert(to_id);
}
else {
Expand Down

0 comments on commit f9906dd

Please sign in to comment.