From unknown Fri Mar 29 06:53:41 2024 X-Loop: owner@bugs.x2go.org Subject: Bug#253: ONMainWindow::closeEvent: If statement depends on uninitialised value. Reply-To: Heinrich Schuchardt , 253@bugs.x2go.org Resent-From: Heinrich Schuchardt Resent-To: x2go-dev@lists.berlios.de Resent-CC: X2Go Developers X-Loop: owner@bugs.x2go.org Resent-Date: Fri, 28 Jun 2013 19:03:01 +0000 Resent-Message-ID: Resent-Sender: owner@bugs.x2go.org X-X2Go-PR-Message: report 253 X-X2Go-PR-Package: x2goclient X-X2Go-PR-Keywords: Received: via spool by submit@bugs.x2go.org id=B.137244563711048 (code B); Fri, 28 Jun 2013 19:03:01 +0000 Received: (at submit) by bugs.x2go.org; 28 Jun 2013 18:53:57 +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.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 [212.227.17.21]) by ymir (Postfix) with ESMTP id 594A05DB1E for ; Fri, 28 Jun 2013 20:53:57 +0200 (CEST) Received: from mailout-de.gmx.net ([10.1.76.33]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0LvP2r-1UAk8E0YQF-010b6A for ; 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 [192.168.123.29]) [109.90.96.202] by mail.gmx.net (mp033) with SMTP; 28 Jun 2013 20:53:57 +0200 X-Authenticated: #41704822 X-Provags-ID: V01U2FsdGVkX18mpqBPKDYmeuep9aCFQXbXZEsHseFgYyWF/AlnlJ kpINKlODRf9yrR Message-ID: <51CDDBC3.7040701@gmx.de> Date: Fri, 28 Jun 2013 20:53:55 +0200 From: Heinrich Schuchardt 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 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Package: x2goclient Version: 4.0.1.0 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 statement 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(). Example: 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*) (onmainwindow.cpp:1415) Best regards Heinrich Schuchardt