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

Commit 4b452deb 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 nyc-dev am:...

Merge "Fix the UAF bug caused by a dead stack variable" into nyc-dev am: b8097855 am: e676c5e0 am: c153373b
am: c355787c

Change-Id: I57f173c10d04c6eff249755b1046ea6f8864094d
parents 005c3318 c355787c
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -1674,10 +1674,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) {