From openbsd@ledeuns.net  Sat May 14 12:26:07 2016
Received: (at submit) by bugs.x2go.org; 14 May 2016 10:26:10 +0000
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=3.0 tests=BAYES_50 autolearn=ham
	version=3.3.2
Received: from localhost (localhost [127.0.0.1])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTP id A85A25DACF
	for <submit@bugs.x2go.org>; Sat, 14 May 2016 12:26:07 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at ymir.das-netzwerkteam.de
Received: from ymir.das-netzwerkteam.de ([127.0.0.1])
	by localhost (ymir.das-netzwerkteam.de [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id Zrq2sPEOOQxw for <submit@bugs.x2go.org>;
	Sat, 14 May 2016 12:26:01 +0200 (CEST)
X-Greylist: delayed 399 seconds by postgrey-1.34 at ymir.das-netzwerkteam.de; Sat, 14 May 2016 12:26:01 CEST
Received: from enforcer.ledeuns.net (bmenez.pck.nerim.net [213.41.144.255])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id 2A6255DA8E
	for <submit@bugs.x2go.org>; Sat, 14 May 2016 12:26:00 +0200 (CEST)
Received: from jig-ai.ledeuns.net (denis.ledeuns.net [IPv6:2001:7a8:b5ad::10:10]);
	by mail.ledeuns.net (OpenSMTPD) with ESMTPSA id d8ad5717;
	TLS version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO;
	for <submit@bugs.x2go.org>;
	Sat, 14 May 2016 12:19:20 +0200 (CEST)
Date: Sat, 14 May 2016 12:19:12 +0200
From: Denis Fondras <openbsd@ledeuns.net>
To: submit@bugs.x2go.org
Subject: Fix a segfault in x2goclient with OpenBSD
Message-ID: <20160514101911.GA3577@jig-ai.ledeuns.net>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="bs/OyYmWljJBysDO"
Content-Disposition: inline
User-Agent: Mutt/1.5.24 (2015-08-30)


--bs/OyYmWljJBysDO
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Package: x2goclient
Version: 4.0.5.1
Tag: patch

When compiling X2Go client on OpenBSD5.9/amd64, x2goclient will segfault in
SshMasterConnection::channelLoop(). The culprit is the declaration of buffer[]
inside the code of this function, moving it outside of channelLoop() fixes the
segfault.


--bs/OyYmWljJBysDO
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch-src_sshmasterconnection_cpp

--- src/sshmasterconnection.cpp	Sun May  8 16:58:37 2016
+++ src/sshmasterconnection.cpp	Sun May  8 17:02:54 2016
@@ -54,6 +54,7 @@
 // #define SSH_DEBUG
 
 static bool isLibSshInited=false;
+char buffer[1024*512]; //512K buffer
 
 const QString SshMasterConnection::challenge_auth_code_prompts_[] = {
   "Verification code:",
@@ -1464,7 +1465,6 @@
             copy();
         copyRequestMutex.unlock();
 
-        char buffer[1024*512]; //512K buffer
         int nbytes;
         fd_set rfds;
 

--bs/OyYmWljJBysDO--

