mkvparser_tests: Add invalid BlockGroup test.
Change-Id: I2b24859a92d2beb5558c2afa817237c1f78f644d
This commit is contained in:
parent
2349904020
commit
8f521f2192
@ -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[]) {
|
||||||
|
5
testing/testdata/invalid/README.libwebm
vendored
5
testing/testdata/invalid/README.libwebm
vendored
@ -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.
|
||||||
|
BIN
testing/testdata/invalid/blockgroup_block_ends_beyond_blockgroup.mkv
vendored
Normal file
BIN
testing/testdata/invalid/blockgroup_block_ends_beyond_blockgroup.mkv
vendored
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user