Files
taglib/tests
Nathan ChandrasekarandGitHub 50ca520b27 ByteVector, List: Check indices if the standard library does (#1467)
If the standard library checks the index in std::vector::operator[]
(_GLIBCXX_ASSERTIONS, libc++ hardening modes), ByteVector::operator[]
and List::operator[] now check the index against their own size and
abort if it is out of range, as std::vector does.

The std::vector check alone is not enough: a ByteVector created by
mid() shares the buffer of the original byte vector, so an index past
the end of the smaller vector still passes it. List::operator[] walks
a std::list, which these checks do not cover.

Builds without these macros are unchanged; a GCC Release build of
libtag produces identical code. The Ubuntu CI job now builds with
-D_GLIBCXX_ASSERTIONS so that the tests run with the checks enabled.
2026-10-31 12:07:55 +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
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