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

Commit 9f767a43 authored by Yamit Mehta's avatar Yamit Mehta Committed by Linux Build Service Account
Browse files

stagefright: handle zero size field in ID3v2 header

Specific clip contains corrupt ID3v2 header where size field is zero. This
corner case isn't handled properly and leads to crash.

Change-Id: Ic7e97b9de84b0cb3ce3716db95ab05f8f0db336f
CRs-Fixed: 815025
parent ab600b35
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -503,8 +503,9 @@ void ID3::Iterator::getString(String8 *id, String8 *comment) const {
void ID3::Iterator::getstring(String8 *id, bool otherdata) const {
    id->setTo("");

    const uint8_t *frameData = mFrameData;
    if (frameData == NULL) {
    size_t size = 0;
    const uint8_t *frameData = getData(&size);
    if ((frameData == NULL) || (size == 0)) {
        return;
    }