Text   |  XML   |  ReML   |   Visible Warnings:

File System Race Condition  at filesystem.c:1031

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

delete_persconffile_profile

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/filesystem.c)expand/collapse
Show more  
 1039  delete_persconffile_profile(const char *profilename, char **pf_dir_path_return)
 1040  {
 1041[+]         const char *profile_dir = get_persconffile_dir(profilename);
 1042          int ret = 0;
 1043   
 1044[+]         if (test_for_directory (profile_dir) == EISDIR) {
 1045[+]                 ret = delete_directory (profile_dir, pf_dir_path_return);
expand/collapse

delete_directory

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/filesystem.c)expand/collapse
Show more  
 1002  delete_directory (const char *directory, char **pf_dir_path_return)
 1003  {
 1004          WS_DIR *dir;
 1005          WS_DIRENT *file;
 1006          gchar *filename;
 1007          int ret = 0;
 1008   
 1009          if ((dir = ws_dir_open(directory, 0, NULL)) != NULL) {
 1010                  while ((file = ws_dir_read_name(dir)) != NULL) {
 1011                          filename = g_strdup_printf ("%s%s%s", directory, G_DIR_SEPARATOR_S,
 1012                                                      ws_dir_get_name(file));
 1013                          if (test_for_directory(filename) != EISDIR) {
 1014                                  ret = ws_remove(filename);
 1015  #if 0 
 1016                          } else {
 1017                                  /* The user has manually created a directory in the profile directory */
 1018                                  /* I do not want to delete the directory recursively yet */
 1019                                  ret = delete_directory (filename, pf_dir_path_return);
 1020  #endif
 1021                          }
 1022                          if (ret != 0) {
 1023                                  *pf_dir_path_return = filename;
 1024                                  break;
 1025                          }
 1026                          g_free (filename);
 1027                  }
 1028                  ws_dir_close(dir);
 1029          }
 1030   
 1031          if (ret == 0 && (ret = ws_remove(directory)) != 0) {
Show more  
Show more  




Change Warning 4236.30306 : File System Race Condition

Priority:
State:
Finding:
Owner:
Note: