[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bugs-dist
Subject: Bug#2608: kcmdlineargs, segmentation fault when starting kdm
From: Ferdi Franceschini <ferdif () optusnet ! com ! au>
Date: 2000-02-01 11:40:11
[Download RAW message or body]
Package: kdelibs
Version: krash
Snapshot: kdelibs-20000131
When I run kdm it aborts before displaying the greeter.
I have located the bug in kcmdlineargs.cpp and I have attached a patch
that seems to fix the problem.
Basically the problem is that kgreeter creates an argv array with some
NULL pointers. This causes a segmentation fault in
KCmdLineArgs::parseAllArgs() when it tries to dereference the
NULL entry.
I can fix the problem by getting parseAllargs() to skip the NULL entries
(see patch), you probably have a better solution.
Following is a transcript of the gdb debugging session
Program received signal SIGSEGV, Segmentation fault.
0x400d5565 in KCmdLineArgs::parseAllArgs () at kcmdlineargs.cpp:437
437 if ((argv[i][0] == '-') && inOptions)
Current language: auto; currently c++
(gdb) p KCmdLineArgs::argv[i]
$1 = 0x0
If you need more info let me know.
With regards
Ferdi
["kcmdlineargs.diff" (text/plain)]
--- kcmdlineargs.cpp Tue Feb 1 21:29:45 2000
+++ kcmdlineargs.cpp.new Tue Feb 1 21:46:06 2000
@@ -434,6 +434,7 @@
}
for(int i = 1; i < argc; i++)
{
+ if (argv[i]) /* skip NULL arguments */
if ((argv[i][0] == '-') && inOptions)
{
bool enabled = true;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic