Skip to content

Commit

Permalink
specific check for bad size field in header attributes (related to #248)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterhillman committed Jul 11, 2019
1 parent eda733c commit 4c146c5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions OpenEXR/IlmImf/ImfHeader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1185,6 +1185,11 @@ Header::readFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int &version)
checkIsNullTerminated (typeName, "attribute type name");
OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read <OPENEXR_IMF_INTERNAL_NAMESPACE::StreamIO> (is, size);

if( size < 0 )
{
throw IEX_NAMESPACE::InputExc("Invalid size field in header attribute");
}

AttributeMap::iterator i = _map.find (name);

if (i != _map.end())
Expand Down

0 comments on commit 4c146c5

Please sign in to comment.