diff --git a/libheif/box.cc b/libheif/box.cc index 666663b954..df1d9ec2e8 100644 --- a/libheif/box.cc +++ b/libheif/box.cc @@ -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);