Commit 2f939e50 authored by Michael Pyne's avatar Michael Pyne
Browse files

Backport extra checks for encrypted or compressed (without zlib support in taglib) APIC frames

in ID3 files to 4.1.

Not required based on most people not having files with this problem but this is a potential
crash and partial checking already exists for this case.

svn path=/branches/KDE/4.1/kdemultimedia/juk/; revision=831708
parent 100d7b8a
......@@ -275,7 +275,7 @@ QPixmap CoverInfo::pixmap(CoverSize size) const
// Both thumbnail and full size should use FrontCover, as
// FileIcon may be too small even for thumbnail.
if(frame->type() != TagLib::ID3v2::AttachedPictureFrame::FrontCover)
if(frame && frame->type() != TagLib::ID3v2::AttachedPictureFrame::FrontCover)
selectedFrame = frame;
......@@ -287,7 +287,10 @@ QPixmap CoverInfo::pixmap(CoverSize size) const
// so just use the first picture.
selectedFrame = static_cast<TagLib::ID3v2::AttachedPictureFrame *>(frames.front());
selectedFrame = dynamic_cast<TagLib::ID3v2::AttachedPictureFrame *>(frames.front());
if(!selectedFrame) // Could occur for encrypted picture frames.
return QPixmap();
QByteArray pictureData = QByteArray(selectedFrame->picture().data(),
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment