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

Commit fd12ac32 authored by Pawin Vongmasa's avatar Pawin Vongmasa Committed by android-build-merger
Browse files

Merge "Fix the UAF bug caused by a dead stack variable" into oc-dr1-dev

am: 3afa6a5f

Change-Id: I91a738228413f1d2a90dfa27483f612fa604a46d
parents 92f48fc7 3afa6a5f
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -1860,10 +1860,12 @@ void MPEG4Writer::Track::getCodecSpecificDataFromInputFormatIfPossible() {
            || !strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_AAC)) {
        if (mMeta->findData(kKeyESDS, &type, &data, &size)) {
            ESDS esds(data, size);
            if (esds.getCodecSpecificInfo(&data, &size) != OK) {
                data = NULL;
                size = 0;
            if (esds.getCodecSpecificInfo(&data, &size) == OK &&
                    data != NULL &&
                    copyCodecSpecificData((uint8_t*)data, size) == OK) {
                mGotAllCodecSpecificData = true;
            }
            return;
        }
    }
    if (data != NULL && copyCodecSpecificData((uint8_t *)data, size) == OK) {