Bug 75713 - incomplete command line options definition in chooser
Summary: incomplete command line options definition in chooser
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kdebase
Version: 7.3
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Than Ngo
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-10-11 13:16 UTC by Need Real Name
Modified: 2007-04-18 16:47 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-10-11 13:20:10 UTC
Embargoed:


Attachments (Terms of Use)
Patch for 'chooser.cpp' (527 bytes, patch)
2002-10-11 13:20 UTC, Need Real Name
no flags Details | Diff

Description Need Real Name 2002-10-11 13:16:30 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)

Description of problem:
Source file kdm/chooser/chooser.cpp contains incorrect definition for command 
line options.
This definition must be done in accordance with KDELIBS-3.0 documentation (see 
http://developer.kde.org/documentation/library/3.0-
api/classref/kdecore/KCmdLineArgs.html#KApplication).
The last structure of options array must be {0,0,0}.
But in  kdm/chooser/chooser.cpp we see:
#-----------chooser.cpp----------------
......
static KCmdLineOptions options[] = {
    /* XXX use I18N_NOOP !!!! */
    {"xdmaddress <addr>", "Specify the chooser socket (in hex)", 0},
    {"clientaddress <addr>", "Specify the client ip (in hex)", 0},
    {"connectionType <type>", "Specify the connection type (in dec)", 0},
    {"+[host]", "Specify the hosts to list or use BROADCAST", 0}
};
......
#--------------------------------------
GCC 2.96 - and GCC 3.2-compiled chooser run succesfully.
But if another compiler (such as Intel C++ compiler for Linux) is being used 
chooser crashes in the function parseAllArgs () at kcmdlineargs.cpp 
line#536: "if (option->name[0] == '+')"

The simplest way to solve the problem is to add {0,0,0} at the end of command 
line options (patch is attached).


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.install Intel C++ compiler for Linux
2.build the package using Intel C++ compiler 
3.cd kdm/chooser
4../chooser
	

Actual Results:  Segmentation fault

Expected Results:  application window must be shown

Additional info:

Comment 1 Need Real Name 2002-10-11 13:20:04 UTC
Created attachment 79964 [details]
Patch for 'chooser.cpp'

Comment 2 Ngo Than 2002-10-11 17:58:31 UTC
It's already fixed in 3.0.3. nevertheless thanks for your report


Note You need to log in before you can comment on or make changes to this bug.