Skip to content

Commit

Permalink
Fixed issue occurring when the passed length exceeds GetLength()
Browse files Browse the repository at this point in the history
  • Loading branch information
dimiden committed Nov 14, 2024
1 parent 1c0f795 commit f4ed72d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/projects/base/ovlibrary/data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,11 +418,11 @@ namespace ov

String Data::ToHexString(size_t length) const
{
return ov::ToHexString(GetDataAs<const uint8_t>(), length);
return ov::ToHexString(GetDataAs<const uint8_t>(), std::min(GetLength(), length));
}

String Data::ToHexString() const
{
return ToHexString(GetLength());
return ov::ToHexString(GetDataAs<const uint8_t>(), GetLength());
}
} // namespace ov

0 comments on commit f4ed72d

Please sign in to comment.