mirror of
https://github.com/taglib/taglib.git
synced 2025-07-18 21:14:23 -04:00
Prevent the segment table of Ogg pages from exceeding the size limit.
This commit is contained in:
@ -42,7 +42,8 @@ class TestOGG : public CppUnit::TestFixture
|
||||
{
|
||||
CPPUNIT_TEST_SUITE(TestOGG);
|
||||
CPPUNIT_TEST(testSimple);
|
||||
CPPUNIT_TEST(testSplitPackets);
|
||||
CPPUNIT_TEST(testSplitPackets1);
|
||||
CPPUNIT_TEST(testSplitPackets2);
|
||||
CPPUNIT_TEST(testDictInterface1);
|
||||
CPPUNIT_TEST(testDictInterface2);
|
||||
CPPUNIT_TEST(testAudioProperties);
|
||||
@ -67,7 +68,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void testSplitPackets()
|
||||
void testSplitPackets1()
|
||||
{
|
||||
ScopedFileCopy copy("empty", ".ogg");
|
||||
string newname = copy.fileName();
|
||||
@ -110,6 +111,33 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void testSplitPackets2()
|
||||
{
|
||||
ScopedFileCopy copy("empty", ".ogg");
|
||||
string newname = copy.fileName();
|
||||
|
||||
const String text = longText(60890, true);
|
||||
|
||||
{
|
||||
Vorbis::File f(newname.c_str());
|
||||
f.tag()->setTitle(text);
|
||||
f.save();
|
||||
}
|
||||
{
|
||||
Vorbis::File f(newname.c_str());
|
||||
CPPUNIT_ASSERT(f.isValid());
|
||||
CPPUNIT_ASSERT_EQUAL(text, f.tag()->title());
|
||||
|
||||
f.tag()->setTitle("ABCDE");
|
||||
f.save();
|
||||
}
|
||||
{
|
||||
Vorbis::File f(newname.c_str());
|
||||
CPPUNIT_ASSERT(f.isValid());
|
||||
CPPUNIT_ASSERT_EQUAL(String("ABCDE"), f.tag()->title());
|
||||
}
|
||||
}
|
||||
|
||||
void testDictInterface1()
|
||||
{
|
||||
ScopedFileCopy copy("empty", ".ogg");
|
||||
|
Reference in New Issue
Block a user