Fix GCC 8 memset warning and set -Werror only for debug builds, resolves #1558
This commit is contained in:
@@ -140,7 +140,11 @@ void Server::generatePassword(const Request &r, Response *protocolResp)
|
||||
protocolResp->setVerifier(key);
|
||||
protocolResp->setEntries(QList<Entry>() << Entry("generate-password", bits, password, "generate-password"));
|
||||
|
||||
memset(password.data(), 0, password.length());
|
||||
int size = password.capacity();
|
||||
volatile auto* mem = reinterpret_cast<volatile ushort*>(password.data());
|
||||
while (size--) {
|
||||
*mem++ = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void Server::handleRequest(const QByteArray& data, QHttpResponse* response)
|
||||
|
||||
Reference in New Issue
Block a user