]> granicus.if.org Git - taglib/commitdiff
If a frame has both compression and encryption, since we currently
authorScott Wheeler <wheeler@kde.org>
Sat, 28 Jan 2006 14:00:48 +0000 (14:00 +0000)
committerScott Wheeler <wheeler@kde.org>
Sat, 28 Jan 2006 14:00:48 +0000 (14:00 +0000)
don't support encrypted frames, don't try to decompress it.  Decryption
is supposed to be applied before decompression, so currently the decompression
isn't possible.

BUG:112919

git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@503234 283d02a7-25f6-0310-bc7c-ecb5cbfe19da

mpeg/id3v2/id3v2frame.cpp

index f58e3500442f59117a19c6244cb769dee27fd7d4..fc090fef4095792418630785cfa5c1f4d52d5c0c 100644 (file)
@@ -168,7 +168,9 @@ ByteVector Frame::fieldData(const ByteVector &frameData) const
   }
 
 #if HAVE_ZLIB
-  if(d->header->compression()) {
+  if(d->header->compression() &&
+     !d->header->encryption())
+  {
     ByteVector data(frameDataLength);
     uLongf uLongTmp = frameDataLength;
     ::uncompress((Bytef *) data.data(),