diff --git a/taglib/mpeg/id3v2/id3v2synchdata.cpp b/taglib/mpeg/id3v2/id3v2synchdata.cpp index 2aa99999..ba848dec 100644 --- a/taglib/mpeg/id3v2/id3v2synchdata.cpp +++ b/taglib/mpeg/id3v2/id3v2synchdata.cpp @@ -74,6 +74,10 @@ ByteVector SynchData::fromUInt(unsigned int value) ByteVector SynchData::decode(const ByteVector &data) { + if (data.size() == 0) { + return ByteVector(); + } + // We have this optimized method instead of using ByteVector::replace(), // since it makes a great difference when decoding huge unsynchronized frames.