diff options
author | Riccardo Spagni <ric@spagni.net> | 2018-01-10 11:53:42 +0100 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2018-01-10 11:53:42 +0100 |
commit | 1c11ec71b53f25aa19ac8b4e7c7aab09add8aa6f (patch) | |
tree | 8d4293f2eae4163bf8125991babbe8b8ca906741 /contrib | |
parent | Merge pull request #2993 (diff) | |
parent | wipeable_string: fix buffer overread (diff) | |
download | monero-1c11ec71b53f25aa19ac8b4e7c7aab09add8aa6f.tar.xz |
Merge pull request #2995
6ccc51f6 wipeable_string: fix buffer overread (moneromooo-monero)
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/epee/src/wipeable_string.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/epee/src/wipeable_string.cpp b/contrib/epee/src/wipeable_string.cpp index 894c47bbd..08a975e58 100644 --- a/contrib/epee/src/wipeable_string.cpp +++ b/contrib/epee/src/wipeable_string.cpp @@ -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)); } |