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

Commit c0c9f50d authored by Marco Nelissen's avatar Marco Nelissen
Browse files

Check section size when verifying CRC

Bug: 28333006
Change-Id: Ief7a2da848face78f0edde21e2f2009316076679
parent eaa4d780
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1713,6 +1713,13 @@ bool ATSParser::PSISection::isCRCOkay() const {
    unsigned sectionLength = U16_AT(data + 1) & 0xfff;
    ALOGV("sectionLength %u, skip %u", sectionLength, mSkipBytes);


    if(sectionLength < mSkipBytes) {
        ALOGE("b/28333006");
        android_errorWriteLog(0x534e4554, "28333006");
        return false;
    }

    // Skip the preceding field present when payload start indicator is on.
    sectionLength -= mSkipBytes;