mirror of
https://github.com/taglib/taglib.git
synced 2025-07-18 21:14:23 -04:00
Make FLAC::File tolerant to zero-sized padding blocks.
This commit is contained in:
BIN
tests/data/zero-sized-padding.flac
Normal file
BIN
tests/data/zero-sized-padding.flac
Normal file
Binary file not shown.
@ -25,6 +25,7 @@ class TestFLAC : public CppUnit::TestFixture
|
||||
CPPUNIT_TEST(testSaveMultipleValues);
|
||||
CPPUNIT_TEST(testDict);
|
||||
CPPUNIT_TEST(testInvalid);
|
||||
CPPUNIT_TEST(testZeroSizedPadding);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
@ -255,6 +256,14 @@ public:
|
||||
CPPUNIT_ASSERT_EQUAL(TagLib::uint(0), f.properties().size());
|
||||
}
|
||||
|
||||
void testZeroSizedPadding()
|
||||
{
|
||||
ScopedFileCopy copy("zero-sized-padding", ".flac");
|
||||
|
||||
FLAC::File f(copy.fileName().c_str());
|
||||
CPPUNIT_ASSERT(f.isValid());
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(TestFLAC);
|
||||
|
Reference in New Issue
Block a user