Bug 490501 - tsclient segfaults in g_free() when given file arguments on command line
Summary: tsclient segfaults in g_free() when given file arguments on command line
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: tsclient
Version: 4.7
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Søren Sandmann Pedersen
QA Contact: desktop-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-03-16 18:25 UTC by Dan Astoorian
Modified: 2014-06-18 09:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-20 13:25:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
fix g_free() of command line arguments (824 bytes, patch)
2009-03-16 18:25 UTC, Dan Astoorian
no flags Details | Diff

Description Dan Astoorian 2009-03-16 18:25:39 UTC
Created attachment 335386 [details]
fix g_free() of command line arguments

Description of problem:
When given a file argument (e.g., "tsclient ~/.tsclient/last.tsc"), tsclient aborts with a segmentation fault.

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

How reproducible:
Always(?)

Steps to Reproduce:
1. Create a remote desktop file (e.g., by running tsclient and selecting "Save As")
2. Run tsclient with the remote desktop file's pathname as an argument.

  
Actual results:
Segmentation fault

Expected results:
tsclient should read the remote desktop file and present a dialog with the settings pre-set from the file.

Additional info:
The segmentation fault occurs at line 100 of main.c:
    g_free (rdp_file_name);
This is because rdp_file_name is set to argv[i], which was never g_malloc()d.

Calling g_strdup() when assigning rdp_file_name seems to fix the problem (see attached patch).

This bug interferes with the ability to associate application/rdp files with /usr/bin/tsclient.

Comment 1 Jiri Pallich 2012-06-20 13:25:37 UTC
Thank you for submitting this issue for consideration in Red Hat Enterprise Linux. The release for which you requested us to review is now End of Life. 
Please See https://access.redhat.com/support/policy/updates/errata/

If you would like Red Hat to re-consider your feature request for an active release, please re-open the request via appropriate support channels and provide additional supporting details about the importance of this issue.


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