mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-27 19:03:46 +02:00
Make Mediabunny more resilient against data boxes ending abruptly
This commit is contained in:
@@ -70,6 +70,10 @@ export const readDataBox = (slice: FileSlice) => {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (slice.remainingLength < 4) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const typeIndicator = readU32Be(slice);
|
||||
slice.skip(4); // Locale indicator
|
||||
const data = readBytes(slice, header.contentSize - 8);
|
||||
|
||||
Reference in New Issue
Block a user