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

am: 3afa6a5f86

Change-Id: I6885082279724db354084793a99c189c49334a75
gugelfrei
Pawin Vongmasa 7 years ago committed by android-build-merger
commit 42e55ea1b4

@ -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) {

Loading…
Cancel
Save