aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/demo
diff options
context:
space:
mode:
authorDoyle <doylet@protonmail.com>2020-05-19 18:45:32 +1000
committerDoyle <doylet@protonmail.com>2020-05-20 10:21:21 +1000
commit438b84690e818b136b84f31a12e67a83fec8979b (patch)
tree9024b925aa0b2c4ce9276403915242769279316b /contrib/epee/demo
parentMerge pull request #6554 (diff)
downloadmonero-438b84690e818b136b84f31a12e67a83fec8979b.tar.xz
ByteSlice: Fix persisting ptr to std::moved SSO buffer
The Bug: 1. Construct `byte_slice.portion_` with `epee::span(buffer)` which copies a pointer to the SSO buffer to `byte_slice.portion_` 2. It constructs `byte_slice.storage_` with `std::move(buffer)` (normally this swap pointers, but SSO means a memcpy and clear on the original SSO buffer) 3. `slice.data()` returns a pointer from `slice.portion_` that points to the original SSO cleared buffer, `slice.storage_` has the actual string.
Diffstat (limited to 'contrib/epee/demo')
0 files changed, 0 insertions, 0 deletions