From e37a69252eb7c564fd888361b3672cfc31eca949 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9=20Klitzing?= <aklitzing@gmail.com>
Date: Mon, 17 Nov 2014 18:41:05 +0100
Subject: [PATCH] Fix memcpy with incorrect destination

Variable dsa is assigned in this block with q_DSA_new instead of rsa.
So this should be the destination of memcpy.

Change-Id: Id5a41d99f1606bf525ad5f819bbc06bb1235bf5b
Reviewed-by: Richard J. Moore <rich@kde.org>
---
 src/network/ssl/qsslkey_openssl.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/network/ssl/qsslkey_openssl.cpp b/src/network/ssl/qsslkey_openssl.cpp
index 6b0fa954eb0..e4d30ff229b 100644
--- a/src/network/ssl/qsslkey_openssl.cpp
+++ b/src/network/ssl/qsslkey_openssl.cpp
@@ -95,7 +95,7 @@ bool QSslKeyPrivate::fromEVP_PKEY(EVP_PKEY *pkey)
         type = QSsl::PrivateKey;
 
         dsa = q_DSA_new();
-        memcpy(rsa, q_EVP_PKEY_get1_DSA(pkey), sizeof(DSA));
+        memcpy(dsa, q_EVP_PKEY_get1_DSA(pkey), sizeof(DSA));
 
         return true;
     }
-- 
GitLab