Text   |  XML   |  ReML   |   Visible Warnings:

File System Race Condition  at filesystem.c:1522

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

uat_get_actual_filename

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/uat.c)expand/collapse
Show more  
 166  gchar* uat_get_actual_filename(uat_t* uat, gboolean for_writing) {
 167   
 168[+]         gchar* pers_fname =  get_persconffile_path(uat->filename, uat->from_profile, for_writing);
 169   
 170          if (! for_writing ) {
 171                  gchar* data_fname = get_datafile_path(uat->filename);
 172   
 173[+]                 if ((! file_exists(pers_fname) ) && file_exists(data_fname)) {
 174                          g_free(pers_fname);
 175                          return data_fname;
 176                  }
 177   
 178                  g_free(data_fname);
 179          }
 180   
 181[+]         if ((! file_exists(pers_fname) ) && (! for_writing ) ) {
expand/collapse

file_exists

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/filesystem.c)expand/collapse
Show more  
 1503  file_exists(const char *fname)
 1504  {
 1505          struct stat   file_stat;
 1506   
 1507  #ifdef _WIN32 
 1508          /*
 1509           * This is a bit tricky on win32. The st_ino field is documented as:
 1510           * "The inode, and therefore st_ino, has no meaning in the FAT, ..."
 1511           * but it *is* set to zero if stat() returns without an error,
 1512           * so this is working, but maybe not quite the way expected. ULFL 
 1513           */
 1514          file_stat.st_ino = 1;   /* this will make things work if an error occured */
 1515          ws_stat(fname, &file_stat);
 1516          if (file_stat.st_ino == 0) {
 1517                  return TRUE;
 1518          } else {
 1519                  return FALSE;
 1520          }
 1521  #else
 1522          if (ws_stat(fname, &file_stat) != 0 && errno == ENOENT) {
Show more  
Show more  




Change Warning 2647.30335 : File System Race Condition

Priority:
State:
Finding:
Owner:
Note: