Text   |  XML   |  ReML   |   Visible Warnings:

Null Pointer Dereference  at imem.c:25

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

generate_parameters_file

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/master/ssl-init-main.c)expand/collapse
Show more  
 15  static int generate_parameters_file(const char *fname)
 16  {
 17          const char *temp_fname;
 18          struct file_lock *lock;
 19          mode_t old_mask;
 20          int fd, ret;
 21   
 22[+]         temp_fname = t_strconcat(fname, ".tmp", NULL);
 23   
 24          old_mask = umask(0);
 25          fd = open(temp_fname, O_WRONLY | O_CREAT, 0644);
 26          umask(old_mask);
 27   
 28          if (fd == -1) {
 29                  i_fatal("Can't create temporary SSL parameters file %s: %m",
 30                          temp_fname);
 31          }
 32   
 33          /* If multiple dovecot instances are running, only one of them needs 
 34             to regenerate this file. */
 35          ret = file_try_lock(fd, temp_fname, F_WRLCK,
 36[+]                             FILE_LOCK_METHOD_FCNTL, &lock);
expand/collapse

file_try_lock

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/file-lock.c)expand/collapse
Show more  
 31  int file_try_lock(int fd, const char *path, int lock_type,
 32                    enum file_lock_method lock_method,
 33                    struct file_lock **lock_r)
 34  {
 35[+]         return file_wait_lock(fd, path, lock_type, lock_method, 0, lock_r);
expand/collapse

file_wait_lock

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/file-lock.c)expand/collapse
Show more  
 134  int file_wait_lock(int fd, const char *path, int lock_type,
 135                     enum file_lock_method lock_method,
 136                     unsigned int timeout_secs,
 137                     struct file_lock **lock_r)
 138  {
 139          struct file_lock *lock;
 140          int ret;
 141   
 142[+]         ret = file_lock_do(fd, path, lock_type, lock_method, timeout_secs);
 143          if (ret <= 0)
 144                  return ret;
 145   
 146          lock = i_new(struct file_lock, 1);
 147          lock->fd = fd;
 148[+]         lock->path = i_strdup(path);
expand/collapse

i_strdup

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/imem.c)expand/collapse
Show more  
 23  char *i_strdup(const char *str)
 24  {
 25      char *rv = strdup( str );
Show more  
Show more  
Show more  
Show more  




Change Warning 11837.24665 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: