diff options
| author | jhurst <jhurst@cinecert.com> | 2016-06-28 22:00:06 +0000 |
|---|---|---|
| committer | jhurst <> | 2016-06-28 22:00:06 +0000 |
| commit | 976a32de62b29ed688abecdebd6cb57f3ed299e7 (patch) | |
| tree | b402cc53c5141043d5282b8b5907f87724bf492c /src/MXF.cpp | |
| parent | 7fc5128ca2651e66913f26f0d2e4129511d89afd (diff) | |
o Fixed a bug in the index reader that allowed an out-of-bounds vector index to be used
o Modified the IndexEntry parser to ignore additional bytes belonging to slice values
Diffstat (limited to 'src/MXF.cpp')
| -rwxr-xr-x | src/MXF.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/MXF.cpp b/src/MXF.cpp index 92ae5bb..45b0298 100755 --- a/src/MXF.cpp +++ b/src/MXF.cpp @@ -1216,8 +1216,16 @@ ASDCP::MXF::OPAtomIndexFooter::Lookup(ui32_t frame_num, IndexTableSegment::Index { ui64_t tmp = frame_num - start_pos; assert(tmp <= 0xFFFFFFFFL); - Entry = segment->IndexEntryArray[(ui32_t) tmp]; - return RESULT_OK; + + if ( tmp < segment->IndexEntryArray.size() ) + { + Entry = segment->IndexEntryArray[(ui32_t) tmp]; + return RESULT_OK; + } + else + { + DefaultLogSink().Error("Malformed index table segment, IndexDuration does not match entries.\n"); + } } } } |
