Avoid an infinite loop when reading fuzzed WavPack files. (#482)

This commit is contained in:
Tsuda Kageyu
2015-05-22 14:11:06 +09:00
parent 0ea22348cb
commit 3094540a4b
3 changed files with 24 additions and 22 deletions

BIN
tests/data/infloop.wv Normal file

Binary file not shown.

View File

@ -35,6 +35,11 @@ public:
CPPUNIT_ASSERT_EQUAL(4, props->length());
}
void testFuzzedFile()
{
WavPack::File f(TEST_FILE_PATH_C("infloop.wv"));
CPPUNIT_ASSERT(f.isValid());
}
};
CPPUNIT_TEST_SUITE_REGISTRATION(TestWavPack);