• Reimar Döffinger's avatar
    matroskadec: add generic element length validation. · 95ec3d4c
    Reimar Döffinger authored
    This validate the length of a mkv element directly after reading
    it.
    This has the advantage that it is easy to add new limits and makes
    it less likely to forget to add checks and also avoids issues like
    bits of the length value above the first 32 being ignored because
    the parsing functions only takes an int.
    Previously discussed in the "mkv 0-byte integer parsing" thread.
    Signed-off-by: 's avatarRonald S. Bultje <rsbultje@gmail.com>
    95ec3d4c
matroskadec.c 69.7 KB