Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4c75797a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix edge case when applying id3 unsynchronization" into lmp-dev

parents 48caffe6 3e702964
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -392,8 +392,13 @@ bool ID3::removeUnsynchronizationV2_4(bool iTunesHack) {
                    --mSize;
                    --dataSize;
                }
                if (i + 1 < dataSize) {
                    // Only move data if there's actually something to move.
                    // This handles the special case of the data being only [0xff, 0x00]
                    // which should be converted to just 0xff if unsynchronization is on.
                    mData[writeOffset++] = mData[readOffset++];
                }
            }
            // move the remaining data following this frame
            if (readOffset <= oldSize) {
                memmove(&mData[writeOffset], &mData[readOffset], oldSize - readOffset);