protozero v1.6.0 Release Notes

Release Date: 2017-10-24 // over 6 years ago
  • โž• Added

    • Comparison functions (<, <=, >, >=) for data_view. Allows use in std::map for instance.
    • Tool pbf-decoder for decoding raw messages. This has limited use for normal users, but it can be used for fuzzing.

    ๐Ÿ”„ Changed

    • ๐Ÿ— Protozero now uses CMake to build the tests etc. This does not affect simple users of the library, but if you are using CMake yourself you might want to use the cmake/FindProtozero.cmake module provided. The README contains more information about build options.
    • ๐Ÿšš Moved data_view class from types.hpp into its own header file data_view.hpp.
    • ๐Ÿ›  Implementation of the const_fixed_iterator to use only a single pointer instead of two.
    • Made operator== and operator!= on data_view constexpr.
    • ๐Ÿ—„ The pbf_reader constructor taking a std::pair is deprecated. Use one of the other constructors instead.

    ๐Ÿ›  Fixed

    • Varints where the last byte was larger than what would fit in 64bit were triggering undefined behaviour. This can only happen when the message being decoded was corrupt in some way.
    • Do not assert when reading too long varints for bools any more. A valid encoder should never generate varints with more than one byte for bools, but if they are longer that's not really a problem, so just handle it.
    • ๐Ÿ›  Throw exception if the length of a packed repeated field of a fixed-length type is invalid. The length must always be a multiple of the size of the underlying type. This can only happen if the data is corrupted in some way, a valid encoder would never generate data like this.
    • ๐Ÿ‘ป Throw an exception when reading invalid tags. This can only happen if the data is corrupted in some way, a valid encoder would never generate invalid tags.