From 4c82dd6d120e07b382a7ac59b2dd0d8212dab955 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 25 Oct 2018 15:06:15 +0200 Subject: [PATCH] SSH: Fix decryption in CBC mode Two function call arguments got switched around. Their types, while looking different, were in fact just aliases for the same underlying type, so this was not detected by the compiler. Fixes: QTCREATORBUG-21387 Change-Id: I631d37634501759e37bfc594656f569c4ff1aa72 Reviewed-by: Ulf Hermann --- src/libs/ssh/sshcryptofacility.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/ssh/sshcryptofacility.cpp b/src/libs/ssh/sshcryptofacility.cpp index 83a2490caa7..ea8ce6756ec 100644 --- a/src/libs/ssh/sshcryptofacility.cpp +++ b/src/libs/ssh/sshcryptofacility.cpp @@ -423,7 +423,7 @@ Keyed_Filter *SshDecryptionFacility::makeCipherMode(BlockCipher *cipher, Mode mo { switch (mode) { case CbcMode: - return get_cipher(cipher->name() + "/CBC/NoPadding", iv, key, DECRYPTION); + return get_cipher(cipher->name() + "/CBC/NoPadding", key, iv, DECRYPTION); case CtrMode: return makeCtrCipherMode(cipher, iv, key); }