Merge pull request #476 from TsudaKageyu/fuzzed-ape

Some fixes for fuzzed APE files.
This commit is contained in:
Lukáš Lalinský
2014-12-29 09:47:10 +01:00
5 changed files with 27 additions and 6 deletions

BIN
tests/data/longloop.ape Normal file

Binary file not shown.

BIN
tests/data/zerodiv.ape Normal file

Binary file not shown.

View File

@ -16,6 +16,7 @@ class TestAPE : public CppUnit::TestFixture
CPPUNIT_TEST(testProperties399);
CPPUNIT_TEST(testProperties396);
CPPUNIT_TEST(testProperties390);
CPPUNIT_TEST(testFuzzedFiles);
CPPUNIT_TEST_SUITE_END();
public:
@ -47,6 +48,15 @@ public:
CPPUNIT_ASSERT_EQUAL(44100, f.audioProperties()->sampleRate());
}
void testFuzzedFiles()
{
APE::File f1(TEST_FILE_PATH_C("longloop.ape"));
CPPUNIT_ASSERT(f1.isValid());
APE::File f2(TEST_FILE_PATH_C("zerodiv.ape"));
CPPUNIT_ASSERT(f2.isValid());
}
};
CPPUNIT_TEST_SUITE_REGISTRATION(TestAPE);