-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
False negative: HandlerBox
(hdlr
) name
field shall not contain NUL bytes prior to terminator
#33
Comments
@baumanj I'm not sure I agree that this is non-spec compliant though (although it might be good to output a warning). Since If |
That's a good question. If you agree with MPEGGroup/FileFormat#35 that the
which doesn't seem to allow for extra bytes or else I imagine it would be mentioned there. More generally, this concept seems to be addressed by the @cconcolato: do you have any thoughts? |
Interesting question. @dwsinger opinion? |
yes, perhaps we should have advice that readers should process the fields that they recognize, and if there is extra data in a box after that, ignore it (presuming that they are processing in accordance with a brand). However, it raises an interesting question for file processors: should they copy that data over, or delete it? |
I raised an issue on the MPEG repo. Now regarding ComplianceWarden, I think it could emit a warning if a box contains data past the last known field. |
Still waiting for clarification in MPEGGroup/FileFormat#46. |
OK, two things confused here. (a) should a reader parse what it recognizes and ignore the rest? (b) are you allowed to put garbage after the last parsed field when creating a file? IMHO, the answers are interlinked; to (a) yes, as that enables backward-compatible extensions to the spec, adding fields, without breaking old readers. (b) no, because those extra bytes would be interpreted by those hypothetical future spec-compatible readers as belonging to the newly defined next field. So, in my retired-hence-unprofessional opinion, these files are invalid. They contain data after the last byte that would clash with any extension. |
@dwsinger , I'll be a bit more carefull when saying
I agree that if extensions are defined without versioning, this would break everything. So theoretically speaking, I don't think these files are invalid (but there is a lot of should and hypothetical involved I agree...) |
I was going to say that's fair, if fields are added then the version should be bumped, and no-one should be trying to parse them under v0. But we don't bump the version if the change is a pure backwards-compatible addition; readers (I think) are told not to try parsing boxes when they don't understand the version number, as the change of version may indicate a non-backwards-compatible change. So making a box v1 would break v0 compatibility. So we are back to the general question: do extra bytes aka garbage at the end of the box make a file formally non-compliant? I think so. |
Any news here? |
@cconcolato I was notified that MPEGGroup/FileFormat#46 was completed, please don't forget to update us on the resolution. Thx |
Now that MPEGGroup/FileFormat#35 has clarified the specification, there should be an error for inputs like this one (from https://github.com/AOMediaCodec/av1-avif/blob/master/testFiles/Apple/multilayer_examples/animals_00_multilayer_lsel.avif):
Here is a minimal example: invalid-avif-hdlr-name-multiple-nul.avif.zip
See also #28
The text was updated successfully, but these errors were encountered: