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

Commit 3c10b015 authored by Gloria Wang's avatar Gloria Wang
Browse files

Check the syncword for each frame.

Fix for bug 5117233.

Change-Id: I714c9b671832c9606cabdfe6bb21697c08de2eff
parent 070ce94b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -92,7 +92,7 @@ static size_t getFrameSize(const sp<DataSource> &source, off64_t offset) {
    size_t frameSize = 0;

    uint8_t syncword[2];
    if (source->readAt(0, &syncword, 2) != 2) {
    if (source->readAt(offset, &syncword, 2) != 2) {
        return 0;
    }
    if ((syncword[0] != 0xff) || ((syncword[1] & 0xf6) != 0xf0)) {