Text   |  XML   |  ReML   |   Visible Warnings:

File System Race Condition  at rtp_stream.c:99

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

save_stream_ok_cb

(/home/sate/Testcases/c/cve/wireshark-1.2.0/gtk/rtp_stream_dlg.c)expand/collapse
Show more  
 160  static gboolean save_stream_ok_cb(GtkWidget *ok_bt _U_, gpointer fs)
 161  {
 162          gchar *g_dest;
 163   
 164          if (!selected_stream_fwd) {
 165                  return TRUE;
 166          }
 167   
 168          g_dest = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(fs));
 169   
 170          /* Perhaps the user specified a directory instead of a file.
 171             Check whether they did. */
 172[+]         if (test_for_directory(g_dest) == EISDIR) {
 173                  /* It's a directory - set the file selection box to display it. */
 174                  set_last_open_dir(g_dest);
 175                  g_free(g_dest);
 176                  file_selection_set_current_folder(fs, get_last_open_dir());
 177                  gtk_file_chooser_set_current_name(fs, "");
 178                  return FALSE;
 179          }
 180   
 181  #if 0 /* GtkFileChooser/gtk_dialog_run currently being used.         */
 182        /*  So: Leaving the dialog box displayed after popping-up an   */
 183        /*  alert box won't work.                                      */
 184          /*
 185           * Don't dismiss the dialog box if the save operation fails.
 186           */
 187          if (!rtpstream_save(selected_stream_fwd, g_dest)) {
 188                  g_free(g_dest);
 189                  return;
 190          }
 191          g_free(g_dest);
 192          window_destroy(GTK_WIDGET(rtpstream_save_dlg));
 193          return;
 194  #else
 195          /*  Dialog box needs to be always destroyed. Return TRUE      */
 196          /*  so that caller will destroy the dialog box.               */
 197          /*  See comment under rtpstream_on_save.                      */
 198[+]         rtpstream_save(selected_stream_fwd, g_dest);    
expand/collapse

rtpstream_save

(/home/sate/Testcases/c/cve/wireshark-1.2.0/gtk/rtp_stream.c)expand/collapse
Show more  
 95  gboolean rtpstream_save(rtp_stream_info_t* stream, const gchar *filename)
 96  {
 97          gboolean was_registered = the_tapinfo_struct.is_registered;
 98          /* open file for saving */
 99          the_tapinfo_struct.save_file = ws_fopen(filename, "wb");
Show more  
Show more  




Change Warning 4417.30961 : File System Race Condition

Priority:
State:
Finding:
Owner:
Note: