gpac / ComplianceWarden

A pluggable compliance checker (ISOBMFF, HEIF/MIAF/AVIF, AV1 HDR10+)
https://gpac.github.io/ComplianceWarden-wasm/
Other
16 stars 7 forks source link

isobmff: Fix box size 0 parsing #32

Closed y-guyon closed 2 years ago

y-guyon commented 2 years ago

Add a test exercizing the parsing of boxes of sizes 0 (till the end of the file) and 1 (stored as 64b largesize after box type). tests/avif/valid-64b-box-size-0-box-size.asm is tests/avif/valid.asm with the following changes:

Note: without the fix, cw outputs the following when "mdat" size is 0:

[miaf][Rule #7] Error: Item bodies of coded image "av01" itemID=1 (offset=277) belongs to box "root": expecting "mdat"
[isobmff][Rule #1] Error: Data offset 277 belongs to box "root": expecting "mdat" or "idat"
rbouqueau commented 2 years ago

LGTM, thanks!