mirror of
https://github.com/monero-project/monero.git
synced 2026-01-08 19:31:07 -08:00
wipeable_string: fix buffer overread
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user