Bug 490501 - tsclient segfaults in g_free() when given file arguments on command line
tsclient segfaults in g_free() when given file arguments on command line
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: tsclient (Show other bugs)
4.7
All Linux
low Severity medium
: rc
: ---
Assigned To: Søren Sandmann Pedersen
desktop-bugs@redhat.com
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-16 14:25 EDT by Dan Astoorian
Modified: 2014-06-18 05:11 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-20 09:25:37 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Dan Astoorian 2009-03-16 14:25:39 EDT
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 09:25:37 EDT
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.