ports/118007: kdesu coredumps on setenv()
pluknet
pluknet at gmail.com
Mon Nov 12 15:10:04 UTC 2007
>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:
More information about the freebsd-ports-bugs
mailing list