Date: Mon, 12 Nov 2007 15:02:52 GMT From: pluknet <pluknet@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/118007: kdesu coredumps on setenv() Message-ID: <200711121502.lACF2qsW020399@www.freebsd.org> Resent-Message-ID: <200711121510.lACFA4Da005106@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 118007 >Category: ports >Synopsis: kdesu coredumps on setenv() >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Nov 12 15:10:04 UTC 2007 >Closed-Date: >Last-Modified: >Originator: pluknet >Release: 7.0-BETA1 >Organization: n/a >Environment: FreeBSD notebook.h3 7.0-BETA1 FreeBSD 7.0-BETA1 #0: Thu Oct 25 00:21:05 MSD 2007 i386 >Description: kdesu application (included into kdebase3 port) does not check the "SESSION_MANAGER" value before calling setenv(): QCString session_manager = getenv( "SESSION_MANAGER" ); unsetenv( "SESSION_MANAGER" ); KApplication app; // but propagate it to the started app setenv( "SESSION_MANAGER", session_manager.data(), 1 ); calls it with NULL arg and crashes with next dump: (gdb) where #0 strlen () at /media/src/lib/libc/i386/string/strlen.S:48 #1 0x2960c814 in __setenv (name=0x8052007 "SESSION_MANAGER", nameLen=15, value=0x0, overwrite=1) at /media/src/lib/libc/stdlib/getenv.c:444 #2 0x0804e9b6 in main (argc=Error accessing memory address 0xffffffff: Bad address. ) at kdesu.cpp:116 >How-To-Repeat: just to run kdesu app (I did it without running the whole KDE) >Fix: Place the attached patch into the kdebase3/files directory (remove .txt extension) . Patch attached with submission follows: --- kdesu/kdesu/kdesu.cpp.orig 2007-11-12 17:35:11.000000000 +0300 +++ kdesu/kdesu/kdesu.cpp 2007-11-12 17:35:56.000000000 +0300 @@ -113,7 +113,8 @@ unsetenv( "SESSION_MANAGER" ); KApplication app; // but propagate it to the started app - setenv( "SESSION_MANAGER", session_manager.data(), 1 ); + if (session_manager.data()) + setenv( "SESSION_MANAGER", session_manager.data(), 1 ); { KStartupInfoId id; >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200711121502.lACF2qsW020399>