mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1244523: [mp4] P3. Skip four bytes when we hit a zero length box, r=kentuckyfriedtakahe
Similar to bug 1180101, but don't handle only the last box in the file.
This commit is contained in:
parent
91b04a5c80
commit
3c49e87858
@ -651,14 +651,14 @@ static bool ValidInputSize(int32_t size) {
|
|||||||
status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
|
status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
|
||||||
ALOGV("entering parseChunk %lld/%d", *offset, depth);
|
ALOGV("entering parseChunk %lld/%d", *offset, depth);
|
||||||
uint32_t hdr[2];
|
uint32_t hdr[2];
|
||||||
ssize_t nbytes;
|
if (mDataSource->readAt(*offset, hdr, 4) < 4) {
|
||||||
if ((nbytes = mDataSource->readAt(*offset, hdr, 8)) < 8) {
|
return ERROR_IO;
|
||||||
if (nbytes == 4) {
|
}
|
||||||
if (!hdr[0]) {
|
if (!hdr[0]) {
|
||||||
*offset += 4;
|
*offset += 4;
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
}
|
if (mDataSource->readAt(*offset + 4, hdr + 1, 4) < 4) {
|
||||||
return ERROR_IO;
|
return ERROR_IO;
|
||||||
}
|
}
|
||||||
uint64_t chunk_size = ntohl(hdr[0]);
|
uint64_t chunk_size = ntohl(hdr[0]);
|
||||||
|
Loading…
Reference in New Issue
Block a user