Red Hat Bugzilla – Bug 490501
tsclient segfaults in g_free() when given file arguments on command line
Last modified: 2014-06-18 05:11:02 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):
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.
tsclient should read the remote desktop file and present a dialog with the settings pre-set from the file.
The segmentation fault occurs at line 100 of main.c:
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.
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.