From d5dd9c080867bcc45c6efd2a8aebf7ab5147e59f Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 28 Nov 2016 13:22:51 +0100 Subject: [PATCH] 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 --- src/libs/ssh/sshkeygenerator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/ssh/sshkeygenerator.cpp b/src/libs/ssh/sshkeygenerator.cpp index 3f03e8ba9b4..253e45f6a47 100644 --- a/src/libs/ssh/sshkeygenerator.cpp +++ b/src/libs/ssh/sshkeygenerator.cpp @@ -115,7 +115,7 @@ void SshKeyGenerator::generatePkcs8KeyString(const KeyPtr &key, bool privateKey, keyData = &m_publicKey; } pipe.end_msg(); - keyData->resize(static_cast(pipe.remaining(pipe.message_count()) - 1)); + keyData->resize(static_cast(pipe.remaining(pipe.message_count() - 1))); pipe.read(convertByteArray(*keyData), keyData->size(), pipe.message_count() - 1); }