Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 332023

Summary: Segmentation fault in Topology::init
Product: [Tools] PTP Reporter: Greg Watson <g.watson>
Component: SCIAssignee: Tu Hong Jun <tuhongj>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: g.watson, ronglli, tuhongj
Version: unspecified   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:

Description Greg Watson CLA 2010-12-07 09:17:06 EST
The Topology::init method sets agentPath to the result of SysUtil::get_path_name in certain situations, however get_path_name returns NULL if the argument is not found. Assigning a NULL value to a string is illegal in C++. The code should check the result of get_path_name and report the error condition to the user correctly.
Comment 1 rong li CLA 2011-02-11 01:42:07 EST
It is the same issue as the third issues traced in 'Bug 333492':
  3. Fix an coredump issue when scia is not found.

I have attached the patch in 'Bug 333492'. Pls have a try after the patch is committed.
We have added a check in 'topology.cpp'. If the NULL is returned, it will return with an error code 'SCI_ERR_AGENT_NOTFOUND'. Otherwise, it will assign the value to a string.
Comment 2 rong li CLA 2011-02-11 01:46:05 EST
So this bug should have been resolved.
Comment 3 Greg Watson CLA 2011-03-18 10:37:23 EDT
Closing as fixed.