[vlc-devel] [RFC] demux/mp4: fix 17584: signal error if ReadBox_default fails

Francois Cartegnie fcvlcdev at free.fr
Fri Nov 4 14:55:31 CET 2016

Le 04/11/2016 à 14:28, Filip Roséen a écrit :

>> I'm allowed to check if a box exists or not, even if it's unknown.
>> Use cases I can think about: encryption test. We don't decode it, but we
>> want to check if it applies.

> With that said; rejecting the patch by saying that it is wrong due to
> a problem that the implementation already suffers from is in my
> opinion a *strawman* in terms of argumentation.

The strawman you're pointing to, isn't set in the right place.

You're argumenting about a fix, which does not fix the original problem
(ie the bug reported reduced the enclosing box by one, creating an
infinite loop due to failed seek and relative position only), and that
still broken function could be reused.

> If the structured debug output should include boxes that fails to
> parse, the implementation should be changed to include this data (not
> treat an unknown box as if it was parsed successfully, in my opinion).

This is an inherited 'feature' and there's/was no safe mechanism for
controlling access to data members on corrupt/empty mandatory boxes.

And in case you still want to discuss about the "regression",

> p_box->e_flags |= BOX_FLAG_INCOMPLETE;

wouldn't be there if it was to be released on return.


More information about the vlc-devel mailing list