Stop MP4 analyser from crashing on Apple-generated .mov HEVC boxes

This commit is contained in:
Thulinma 2022-11-10 09:40:28 +01:00
parent 082bca3c30
commit a8139e1b99

View file

@ -2734,7 +2734,7 @@ namespace MP4{
} }
size_t count = 0; size_t count = 0;
size_t offset = 78; size_t offset = 78;
while (offset < payloadSize()){ while (offset <= payloadSize() - 8){
offset += getBoxLen(offset); offset += getBoxLen(offset);
count++; count++;
} }
@ -2878,7 +2878,7 @@ namespace MP4{
} }
size_t count = 0; size_t count = 0;
size_t offset = 28; size_t offset = 28;
while (offset < payloadSize()){ while (offset <= payloadSize() - 8){
offset += getBoxLen(offset); offset += getBoxLen(offset);
count++; count++;
} }