mirror of
https://github.com/taglib/taglib.git
synced 2025-07-18 21:14:23 -04:00
Fix a segfault when reading faulty Ogg/FLAC files.
This commit is contained in:
BIN
tests/data/segfault.oga
Normal file
BIN
tests/data/segfault.oga
Normal file
Binary file not shown.
@ -15,6 +15,7 @@ class TestOggFLAC : public CppUnit::TestFixture
|
||||
{
|
||||
CPPUNIT_TEST_SUITE(TestOggFLAC);
|
||||
CPPUNIT_TEST(testFramingBit);
|
||||
CPPUNIT_TEST(testFuzzedFile);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
@ -39,6 +40,12 @@ public:
|
||||
delete f;
|
||||
}
|
||||
|
||||
void testFuzzedFile()
|
||||
{
|
||||
Ogg::FLAC::File f(TEST_FILE_PATH_C("segfault.oga"));
|
||||
CPPUNIT_ASSERT(!f.isValid());
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(TestOggFLAC);
|
||||
|
Reference in New Issue
Block a user