Skip to content

Commit

Permalink
add sanity check for reading multipart files with no parts (#840)
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
  • Loading branch information
peterhillman committed Sep 22, 2020
1 parent ed560b8 commit 25e9515
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions OpenEXR/IlmImf/ImfMultiPartInputFile.cpp
Expand Up @@ -340,6 +340,11 @@ MultiPartInputFile::initialize()
// Perform usual check on headers.
//

if ( _data->_headers.size() == 0)
{
throw IEX_NAMESPACE::ArgExc ("Files must contain at least one header");
}

for (size_t i = 0; i < _data->_headers.size(); i++)
{
//
Expand Down

0 comments on commit 25e9515

Please sign in to comment.