mkvparser_tests: Add invalid BlockGroup test.

Change-Id: I2b24859a92d2beb5558c2afa817237c1f78f644d
This commit is contained in:
Tom Finegan 2016-08-25 13:18:19 -07:00
parent 2349904020
commit 8f521f2192
3 changed files with 15 additions and 0 deletions

View File

@ -733,6 +733,16 @@ TEST_F(ParserTest, InvalidBlockEndsBeyondCluster) {
segment_->GetFirst()->GetNext(block_entry, block_entry)); segment_->GetFirst()->GetNext(block_entry, block_entry));
} }
TEST_F(ParserTest, InvalidBlockGroupBlockEndsBlockGroup) {
ASSERT_NO_FATAL_FAILURE(CreateSegmentNoHeaderChecks(
"invalid/blockgroup_block_ends_beyond_blockgroup.mkv"));
ASSERT_EQ(0, segment_->Load());
const mkvparser::BlockEntry* block_entry = NULL;
EXPECT_EQ(0, segment_->GetFirst()->GetFirst(block_entry));
EXPECT_EQ(mkvparser::E_FILE_FORMAT_INVALID,
segment_->GetFirst()->GetNext(block_entry, block_entry));
}
} // namespace test } // namespace test
int main(int argc, char* argv[]) { int main(int argc, char* argv[]) {

View File

@ -5,6 +5,11 @@ block_ends_beyond_cluster.mkv -
second reporting a size that would cause the block to end far beyond the end second reporting a size that would cause the block to end far beyond the end
of its parent cluster. of its parent cluster.
blockgroup_block_ends_beyond_blockgroup.mkv -
File containing a single cluster and two blockgroups. The first blockgroup is
valid. The second blockgroup contains a block reporting a size that spans well
past the block and the end of the file.
chapters_truncated_chapter_string.mkv - chapters_truncated_chapter_string.mkv -
File with a Chapters element that ends with a ChapterAtom whose ChapterDisplay File with a Chapters element that ends with a ChapterAtom whose ChapterDisplay
element contains a truncated ChapterString. element contains a truncated ChapterString.