Commit d5dd9c08 authored by Christian Kandeler's avatar Christian Kandeler

SSH: Fix typo in key generator that leads to a crash

Introduced in cc04b849.

Task-number: QTCREATORBUG-17349
Change-Id: Ib392ebbffa3d3bb94890f1a55e7288859709b046
Reviewed-by: David Schulz's avatarDavid Schulz <david.schulz@qt.io>
parent 1d28a2c4
......@@ -115,7 +115,7 @@ void SshKeyGenerator::generatePkcs8KeyString(const KeyPtr &key, bool privateKey,
keyData = &m_publicKey;
}
pipe.end_msg();
keyData->resize(static_cast<int>(pipe.remaining(pipe.message_count()) - 1));
keyData->resize(static_cast<int>(pipe.remaining(pipe.message_count() - 1)));
pipe.read(convertByteArray(*keyData), keyData->size(),
pipe.message_count() - 1);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment