clboss
clboss copied to clipboard
Avoid vector out of bounds access in ParserExposedBuffer.cpp
Accessing elements past the size of a std::vector is undefined behavior [1] and is actually checked in recent versions of LLVM libcxx, which is used in FreeBSD [2].
[1] https://en.cppreference.com/w/cpp/container/vector/operator_at:
Accessing a nonexistent element through this operator is undefined behavior.
[2] https://cgit.freebsd.org/src/tree/contrib/llvm-project/libcxx/include/vector?h=2472e352d80fcf6440fd42fbb16960cc49d05b03#n1393
@vasild Thanks for submitting ... will look