mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-12-23 03:28:52 +00:00
Merge pull request #2995
6ccc51f6
wipeable_string: fix buffer overread (moneromooo-monero)
This commit is contained in:
commit
1c11ec71b5
@ -100,7 +100,7 @@ void wipeable_string::grow(size_t sz, size_t reserved)
|
||||
wipefunc(buffer.data(), old_sz * sizeof(char));
|
||||
buffer.reserve(reserved);
|
||||
buffer.resize(sz);
|
||||
memcpy(buffer.data(), tmp.get(), sz * sizeof(char));
|
||||
memcpy(buffer.data(), tmp.get(), old_sz * sizeof(char));
|
||||
wipefunc(tmp.get(), old_sz * sizeof(char));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user