X2Go Bug report logs - #253
ONMainWindow::closeEvent: If statement depends on uninitialised value.

version graph

Package: x2goclient; Maintainer for x2goclient is X2Go Developers <x2go-dev@lists.x2go.org>; Source for x2goclient is src:x2goclient.

Reported by: Heinrich Schuchardt <xypron.glpk@gmx.de>

Date: Fri, 28 Jun 2013 19:03:01 UTC

Severity: normal

Tags: pending

Found in version

Fixed in version

Done: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>

Bug is archived. No further changes may be made.

Full log

Message #5 received at submit@bugs.x2go.org (full text, mbox, reply):

Received: (at submit) by bugs.x2go.org; 28 Jun 2013 18:53:57 +0000
From xypron.glpk@gmx.de  Fri Jun 28 20:53:57 2013
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM,
	RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2
Received: from mout.gmx.net (mout.gmx.net [])
	by ymir (Postfix) with ESMTP id 594A05DB1E
	for <submit@bugs.x2go.org>; Fri, 28 Jun 2013 20:53:57 +0200 (CEST)
Received: from mailout-de.gmx.net ([]) by mrigmx.server.lan
 (mrigmx001) with ESMTP (Nemesis) id 0LvP2r-1UAk8E0YQF-010b6A for
 <submit@bugs.x2go.org>; Fri, 28 Jun 2013 20:53:57 +0200
Received: (qmail invoked by alias); 28 Jun 2013 18:53:57 -0000
Received: from ip-109-90-96-202.unitymediagroup.de (EHLO []) []
  by mail.gmx.net (mp033) with SMTP; 28 Jun 2013 20:53:57 +0200
X-Authenticated: #41704822
X-Provags-ID: V01U2FsdGVkX18mpqBPKDYmeuep9aCFQXbXZEsHseFgYyWF/AlnlJ
Message-ID: <51CDDBC3.7040701@gmx.de>
Date: Fri, 28 Jun 2013 20:53:55 +0200
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12
MIME-Version: 1.0
To: submit@bugs.x2go.org
Subject: ONMainWindow::closeEvent: If statement depends on uninitialised value.
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
Package: x2goclient
Severity: normal

Dear maintainer,

if in ONMainWindow::ONMainWindow parseParameter(args[i]) fails, close() 
is called generating a QCLoseEvent.

Up to this point variable trayNoclose has not been initialized. Hence in 
ONMainWindow::closeEvent an unitialised variable trayNoclose is used in 

if (trayNoclose && !brokerMode).

Due to initialization brokerMode=false.

Obviously the behavior of closeEvent() is undefined.

Furthermore in ONMainWindow::closeClient() decisions are based on 
unitialized variables trayIcon, and useLdap.

Please, initialize at least these variables before calling close().

valgrind x2goclient --leak-check=full
(--leak-check=full is an illegal parameter for x2goclient)

results in:

==7660== Conditional jump or move depends on uninitialised value(s)
==7660==    at 0x468D1C: ONMainWindow::closeEvent(QCloseEvent*) 

Best regards

Heinrich Schuchardt

Send a report that this bug log contains spam.

X2Go Developers <owner@bugs.x2go.org>. Last modified: Wed Dec 6 08:14:47 2023; Machine Name: ymir.das-netzwerkteam.de

X2Go Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.