diff --git a/src/key_io.cpp b/src/key_io.cpp index 29002afc457eb..6cece47e41039 100644 --- a/src/key_io.cpp +++ b/src/key_io.cpp @@ -274,6 +274,9 @@ CExtKey DecodeExtKey(const std::string& str) key.Decode(data.data() + prefix.size()); } } + if (!data.empty()) { + memory_cleanse(data.data(), data.size()); + } return key; }