Text   |  XML   |  ReML   |   Visible Warnings:

Null Pointer Dereference  at mountpoint.c:96

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

nfs_warn_if_found

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/master/mail-process.c)expand/collapse
Show more  
 512  static void nfs_warn_if_found(const char *mail, const char *full_home_dir)
 513  {
 514          struct mountpoint point;
 515          const char *path;
 516   
 517          if (mail == NULL || *mail == '\0')
 518                  path = full_home_dir;
 519          else {
 520                  path = strstr(mail, ":INDEX=");
 521                  if (path != NULL) {
 522                          /* indexes set separately */
 523                          path += 7;
 524                          if (strncmp(path, "MEMORY", 6) == 0)
 525                                  return;
 526                  } else {
 527                          path = strchr(mail, ':');
 528                          if (path == NULL) {
 529                                  /* autodetection for path */
 530                                  path = mail;
 531                          } else {
 532                                  /* format:path */
 533                                  path++;
 534                          }
 535                  }
 536[+]                 path = home_expand_tilde(t_strcut(path, ':'), full_home_dir);
 537          }
 538   
 539[+]         if (mountpoint_get(path, pool_datastack_create(), &point) <= 0)
expand/collapse

mountpoint_get

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/mountpoint.c)expand/collapse
Show more  
 51  int mountpoint_get(const char *path, pool_t pool, struct mountpoint *point_r)
 52  {
 53  #ifdef MOUNTPOINT_UNKNOWN 
 54          memset(point_r, 0, sizeof(*point_r));
 55          errno = ENOSYS;
 56          return -1;
 57  #elif defined (HAVE_STATFS_MNTFROMNAME) || defined(HAVE_STATVFS_MNTFROMNAME)
 58          /* BSDs */
 59          struct statvfs buf;
 60   
 61          memset(point_r, 0, sizeof(*point_r));
 62
80
Show [ Lines 62 to 80 omitted. ]
 81  #ifdef HAVE_SYS_MNTTAB_H 
 82          union {
 83                  struct mnttab ent;
 84                  struct extmnttab ext;
 85          } ent;
 86  #else
 87          struct mntent *ent;
 88          struct stat st2;
 89  #endif
 90          struct stat st;
 91          const char *device_path = NULL, *mount_path = NULL, *type = NULL;
 92          unsigned int block_size;
 93          FILE *f;
 94   
 95          memset(point_r, 0, sizeof(*point_r));
 96          if (stat(path, &st) < 0) {
Show more  
Show more  




Change Warning 7737.24703 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: