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

Commit 7d2e6be3 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira
Browse files

id3: Instead of aborting the parser on a zero-data frame, just skip that frame

Fixes android.media.cts.MediaScannerTest#testEncodingDetection

Change-Id: I6c17af356791215d678d1e3d4a1f04883fae7537
parent 7758e3ed
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -684,7 +684,10 @@ void ID3::Iterator::findFrame() {
            }

            if (baseSize == 0) {
                return;
                /* Don't try to parse a frame with zero-sized data. Skip this
                 * header entirely */
                mOffset += 10; // http://id3.org/id3v2.4.0-structure section 3.1
                continue;
            }

            // Prevent integer overflow when adding