Files
taglib/tests
Ryan FrancesconiandGitHub ab3526af2e Matroska: Render element sizes at a size length limit with a valid length (#1469)
EBML::minSize() chose the size length for an element's data size with
<= at each limit, so a size of exactly 2^(7n) - 1 (127, 16383, 2097151,
...) was rendered in n bytes with every value bit set. That is the
reserved "unknown size" value (RFC 8794 section 6.2), so a reader no
longer knows where the element ends. A tag value of exactly 127 bytes,
for example, saves without error but reads back as an empty string.

minSize() also returned 0 for any size from 0x7FFFFFFFF (32 GiB) up, so
renderVINT() wrote a size of zero bytes. Sizes up to 2^56 - 2 now use
size lengths 6 to 8; larger sizes still return 0, as no size length can
hold them.

testElementSizeLength checks minSize() on either side of the limit of
each size length from 1 to 8 bytes. testSaveElementSizeAtLengthLimit
saves titles of 126 to 128 and 16382 to 16384 bytes to no-tags.mka and
reads them back.
2026-10-27 04:59:21 +01:00
..
2024-01-21 20:46:27 +01:00
2023-09-16 08:22:36 +02:00
2023-09-16 08:22:36 +02:00
2023-09-16 08:22:36 +02:00
2023-09-16 08:22:36 +02:00
2023-09-16 08:22:36 +02:00
2024-01-21 20:46:27 +01:00
2023-12-07 05:00:00 +01:00
2023-09-16 08:22:36 +02:00
2023-12-18 17:29:39 +01:00
2026-03-31 11:14:44 -05:00
2023-12-07 05:00:00 +01:00
2023-09-16 08:22:36 +02:00
2023-09-16 08:22:36 +02:00
2023-09-16 08:22:36 +02:00
2023-12-07 05:00:00 +01:00