From 4c8007e46150b7309d457287b0ed8d5e366e5347 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Thu, 8 Jun 2023 17:14:28 +0800 Subject: [PATCH] Use std::array to store hash bytes Signed-off-by: Claudio Cambra --- src/gui/filedetails/sharemodel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/filedetails/sharemodel.cpp b/src/gui/filedetails/sharemodel.cpp index 963c4d46b4..146339b50e 100644 --- a/src/gui/filedetails/sharemodel.cpp +++ b/src/gui/filedetails/sharemodel.cpp @@ -59,9 +59,9 @@ QString createRandomPassword() std::mt19937 rng(rand_dev()); QString passwd; - unsigned char unsignedCharArray[numChars]; + std::array unsignedCharArray; - RAND_bytes(unsignedCharArray, numChars); + RAND_bytes(unsignedCharArray.data(), numChars); for (auto i = 0; i < numChars; i++) { auto byte = unsignedCharArray[i];