Files
usvfs/patches/boost_vector_overflow.patch

12 lines
759 B
Diff

--- boost/container/vector.hpp Thu Dec 22 14:33:14 2016
+++ boost - Copy/container/vector.hpp Sat Apr 15 13:00:54 2017
@@ -2255,7 +2255,7 @@
boost::uintptr_t const capaddr = boost::uintptr_t(this->priv_raw_begin() + c);
boost::uintptr_t const aligned_addr = (addr + szt_align_mask) & ~szt_align_mask;
indexes = reinterpret_cast<size_type *>(aligned_addr);
- std::size_t index_capacity = (aligned_addr >= capaddr) ? 0u : (capaddr - addr)/sizeof(size_type);
+ std::size_t index_capacity = (aligned_addr >= capaddr) ? 0u : (capaddr - aligned_addr)/sizeof(size_type);
//Capacity is constant, we're not going to change it
if(index_capacity < PosCount){