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 <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2016-11-28 13:22:51 +01:00
parent 1d28a2c4ff
commit d5dd9c0808

View File

@@ -115,7 +115,7 @@ void SshKeyGenerator::generatePkcs8KeyString(const KeyPtr &key, bool privateKey,
keyData = &m_publicKey; keyData = &m_publicKey;
} }
pipe.end_msg(); 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.read(convertByteArray(*keyData), keyData->size(),
pipe.message_count() - 1); pipe.message_count() - 1);
} }