Backed out changeset 1b04bf621858 (bug 1158568) for bustage on a CLOSED TREE

This commit is contained in:
Carsten "Tomcat" Book 2015-04-28 15:39:41 +02:00
Родитель a4ebdec9ac
Коммит b3ac5654ea
1 изменённых файлов: 7 добавлений и 12 удалений

Просмотреть файл

@ -764,11 +764,6 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
return ERROR_MALFORMED;
}
if (chunk_size >= (size_t)-1 - 128) {
// Could cause an overflow later. Abort.
return ERROR_MALFORMED;
}
char chunk[5];
MakeFourCCString(chunk_type, chunk);
ALOGV("chunk: %s @ %lld, %d", chunk, *offset, depth);
@ -2202,15 +2197,12 @@ status_t MPEG4Extractor::parseMetaData(off64_t offset, size_t size) {
return ERROR_MALFORMED;
}
FallibleTArray<uint8_t> bufferBackend;
if (!bufferBackend.SetLength(size + 1)) {
// OOM ignore metadata.
return OK;
}
uint8_t *buffer = bufferBackend.Elements();
uint8_t *buffer = new uint8_t[size + 1];
if (mDataSource->readAt(
offset, buffer, size) != (ssize_t)size) {
delete[] buffer;
buffer = NULL;
return ERROR_IO;
}
@ -2381,6 +2373,9 @@ status_t MPEG4Extractor::parseMetaData(off64_t offset, size_t size) {
}
}
delete[] buffer;
buffer = NULL;
return OK;
}