Subject: Re: [X2Go-Dev] Bug#945: Fwd: [Bug 1264609] New: [abrt] x2goclient: publickey_to_string(): x2goclient killed by SIGSEGV

From: Orion Poplawski <[email-masked]>
Date: Mon, 21 Sep 2015 21:46:31 -0600

Tags: patch

The attached patch should fix the segfault.

-- 
Orion Poplawski
Technical Manager                     303-415-9701 x222
NWRA/CoRA Division                    FAX: 303-415-9702
3380 Mitchell Lane                  [email-masked]
Boulder, CO 80301              http://www.cora.nwra.com
diff -up x2goclient-4.0.5.0/src/sshmasterconnection.cpp.pubkey x2goclient-4.0.5.0/src/sshmasterconnection.cpp
--- x2goclient-4.0.5.0/src/sshmasterconnection.cpp.pubkey	2015-07-27 20:50:35.000000000 -0600
+++ x2goclient-4.0.5.0/src/sshmasterconnection.cpp	2015-09-21 21:38:43.318974144 -0600
@@ -1091,7 +1091,7 @@ bool SshMasterConnection::userAuthWithKe
         return false;
     }
     ssh_public_key pubkey=publickey_from_privatekey(prkey);
-    if (!prkey)
+    if (!pubkey)
     {
 #ifdef DEBUG
         x2goDebug<<"Failed to get public key from private key."<<endl;