mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 1b04bf621858 (bug 1158568) for bustage on a CLOSED TREE
This commit is contained in:
parent
edf325c708
commit
4adb760fa9
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user