GobySoft / dccl

Dynamic Compact Control Language
Other
17 stars 13 forks source link

Bug: Read past end when passing string less than max_bytes for multibyte ID codec #132

Closed tsaubergine closed 9 months ago

tsaubergine commented 9 months ago

Thanks to Ian Mitchell:

dccl::int32 dccl::Codec::id(CharIterator begin, CharIterator end)

will read past the end iterator if std::distance(begin, end) is less than the id codec size (e.g. passing 1-byte for a 2-byte codec).