mirror of
https://github.com/boostorg/container.git
synced 2026-01-26 09:12:35 +01:00
1eb591e85c699b44bfda5de510e67b21bb3ce6d9
If merge() is called on an empty vector, then priv_merge_in_new_buffer() will call deallocate() with size 0 on the old (not-yet-allocated) vector storage. This violates the Allocator requirement that the pointer passed to deallocate() must have come from a call to allocate() with the same size. Fix this by checking old_cap against 0, and also add a unit test for this bug.
Description
STL-like containers from Boost
Languages
C++
92.1%
C
7.7%
CMake
0.2%