Fix data length indicator check for compressed ID3v2 frames (#1371)

This commit is contained in:
Urs Fleisch
2026-06-26 09:39:27 +02:00
committed by GitHub
parent e958fa0bfa
commit fa189f6cf7
6 changed files with 25 additions and 5 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -1121,7 +1121,7 @@ public:
void testCompressedFrameWithBrokenLength()
{
MPEG::File f(TEST_FILE_PATH_C("compressed_id3_frame.mp3"), false);
MPEG::File f(TEST_FILE_PATH_C("compressed_id3_frame_invalid.mp3"), false);
CPPUNIT_ASSERT(f.ID3v2Tag()->frameListMap().contains("APIC"));
if(zlib::isAvailable()) {
@@ -1132,7 +1132,7 @@ public:
CPPUNIT_ASSERT_EQUAL(String("image/bmp"), frame->mimeType());
CPPUNIT_ASSERT_EQUAL(ID3v2::AttachedPictureFrame::Other, frame->type());
CPPUNIT_ASSERT_EQUAL(String(""), frame->description());
CPPUNIT_ASSERT_EQUAL(static_cast<unsigned int>(86414), frame->picture().size());
CPPUNIT_ASSERT_EQUAL(static_cast<unsigned int>(142), frame->picture().size());
}
else {
// Skip the test if ZLIB is not installed.