diff --git a/taglib/mp4/mp4tag.cpp b/taglib/mp4/mp4tag.cpp index fc75fb45..f929ef64 100644 --- a/taglib/mp4/mp4tag.cpp +++ b/taglib/mp4/mp4tag.cpp @@ -570,7 +570,7 @@ MP4::Tag::updateOffsets(long delta, long offset) atom->offset += delta; } d->file->seek(atom->offset + 9); - ByteVector data = d->file->readBlock(atom->offset - 9); + ByteVector data = d->file->readBlock(atom->length - 9); unsigned int flags = (ByteVector(1, '\0') + data.mid(0, 3)).toUInt(); if(flags & 1) { long long o = data.mid(7, 8).toLongLong();