aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/src/wipeable_string.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/epee/src/wipeable_string.cpp')
-rw-r--r--contrib/epee/src/wipeable_string.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/epee/src/wipeable_string.cpp b/contrib/epee/src/wipeable_string.cpp
index 894c47bbd..5671ed9d9 100644
--- a/contrib/epee/src/wipeable_string.cpp
+++ b/contrib/epee/src/wipeable_string.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, The Monero Project
+// Copyright (c) 2017-2018, The Monero Project
//
// All rights reserved.
//
@@ -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));
}