Wireshark-commits: [Wireshark-commits] master b5ef92e: GTK UI: remove eo_saveable_pathname in favor

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Tue, 5 May 2015 23:49:32 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=b5ef92efc067eb172ab71cc39b0aa3f32ab5f01d
Submitter: Gerald Combs (gerald@xxxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

b5ef92e by David Creswick (dcrewi@xxxxxxxxx):

    GTK UI: remove eo_saveable_pathname in favor of eo_massage_str
    
    The function had several deficiencies:
    
    - When "" is passed as the filename, the function returns a null
      pointer (due to the quirky behavior of g_strsplit_set), which causes a
      segfault when it's dereferenced later. I'm not sure what the correct
      return should be, but it shouldn't be NULL.
    
    - It leaks memory. (The array of strings returned by
      g_strsplit_set are never freed.)
    
    - It only strips out backslashes. That is not the only character that
      is disallowed in filenames, even on windows.
    
    - The functionality is already provided by eo_massage_str and
      it does a more complete job of it.
    
    Change-Id: I4d9eab7506048c5d04de8f163b8af1e3f67c163d
    Reviewed-on: https://code.wireshark.org/review/7996
    Petri-Dish: Alexis La Goutte <alexis.lagoutte@xxxxxxxxx>
    Tested-by: Petri Dish Buildbot <buildbot-no-reply@xxxxxxxxxxxxx>
    Reviewed-by: Alexis La Goutte <alexis.lagoutte@xxxxxxxxx>
    Reviewed-by: Gerald Combs <gerald@xxxxxxxxxxxxx>
    

Actions performed:

    from  fa04dfd   wsdg: clarify gerrit account requirement
    adds  b5ef92e   GTK UI: remove eo_saveable_pathname in favor of eo_massage_str


Summary of changes:
 ui/gtk/export_object_dlg.c |   35 ++++++-----------------------------
 1 file changed, 6 insertions(+), 29 deletions(-)