From 8bb5731ddc2da6d48a4fc1c27d67381be5cb089c Mon Sep 17 00:00:00 2001 From: Roman Nozdrin Date: Tue, 6 Dec 2022 21:56:58 +0300 Subject: [PATCH] MCOL-5310 This patch replaces move-assignment with copy-assignment to avoid memory corruption (#2645) Co-authored-by: Roman Nozdrin --- tools/passwd/secrets.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/passwd/secrets.cpp b/tools/passwd/secrets.cpp index 179d38025..045613981 100644 --- a/tools/passwd/secrets.cpp +++ b/tools/passwd/secrets.cpp @@ -622,10 +622,8 @@ bool load_encryption_keys() { if (!ret.key.empty()) { - // CSPasswdLogging::get()->log(LOG_INFO,"Using encrypted passwords. Encryption key read from '%s'.", - // path.c_str()); - this_unit.key = move(ret.key); - this_unit.iv = move(ret.iv); + this_unit.key = ret.key; + this_unit.iv = ret.iv; } return ret.ok; }