[botan-devel] MemoryVector<T>.end

Jack Lloyd lloyd at randombit.net
Mon Apr 9 19:32:51 EDT 2012


On Mon, Apr 09, 2012 at 03:35:19PM -0700, Stuart Maclean wrote:
> Given the doxygen comment, it appears that the MemoryVector<T>.end() 
> operator points to last element in the buffer.  However if I dereference 
> the resultant pointer, Valgrind says this is an illegal read.  It does 
> seem like the pointer is pointing past the end of the data.
> 
> Apologies if this is known.

Thanks for reporting this. The comment is incorrect, end() returns
one-past-the-end in the same way std::vector does. I've corrected the
comment in mtn.

-Jack



More information about the botan-devel mailing list