mirror of
https://github.com/fmtlib/fmt.git
synced 2026-10-29 02:17:28 +08:00
operator= deallocates the destination's storage but leaves it pointing at the freed block with a stale capacity and size. When the allocator doesn't propagate and the two allocators are unequal, move_alloc copies into that pointer rather than taking over the source's storage, so it writes to freed memory and the destructor then frees the same block again. Restore the inline buffer after deallocating and before calling move(). |
||
|---|---|---|
| .. | ||
| fmt | ||