id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 4772,binary_buffer_iprimitive fails on vector access when reading in zero length item at end of buffer_,Jeff Jackowski ,Matthias Troyer,"When binary_buffer_iprimitive's position == buffer_.size() and binary_buffer_iprimitive::load_impl is called with l = 0, the bracket operator on buffer_ will attempt an out of bounds access. The assertion in load_impl suggests the author was aware these conditions are normal since the assertion evaluates to true. However, the parameters for the call to std::memcpy cannot be evaluated because an assertion within buffer_ fails. Changing load_impl to look like this fixes the problem: void load_impl(void * p, int l) { assert(position+l<=static_cast(buffer_.size())); if (l) { std::memcpy(p,&buffer_[position],l); position += l; } } It looks like the bug should also exist in Boost's trunk, but I cannot get the software I'm working on to build with Boost 1.44 and newer, but that is another issue.",Bugs,reopened,Boost 1.46.0,mpi,Boost 1.47.0,Problem,,,