boostorg / container

STL-like containers from Boost
http://www.boost.org/libs/container/
Boost Software License 1.0
101 stars 113 forks source link

Buffer overflow in monotonic_buffer_resource::do_allocate #151

Closed Boronak closed 4 years ago

Boronak commented 4 years ago

remaining_storage can set aligner to a number of bytes to be discarded which is then passed to allocate_from_current. However, if new memory is actually allocated this value is not reset. The bytes are discarded from the new buffer which may not be big enough to allow this.

aligner.txt

igaztanaga commented 4 years ago

Many thanks for the report!