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

squat_trie_write

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/plugins/fts-squat/squat-trie.c)expand/collapse
Show more  
 1609  static int squat_trie_write(struct squat_trie_build_context *ctx)
 1610  {
 1611          struct squat_trie *trie = ctx->trie;
 1612          struct file_lock *file_lock = NULL;
 1613          struct ostream *output;
 1614          const char *path;
 1615          int fd = -1, ret = 0;
 1616   
 1617          if ((trie->hdr.used_file_size > sizeof(trie->hdr) &&
 1618              trie->unmapped_child_count < trie->hdr.node_count/4) || 1) {
 1619                  /* we might as well recreate the file */
 1620                  ctx->compress_nodes = TRUE;
 1621   
 1622[+]                 path = t_strconcat(trie->path, ".tmp", NULL);
 1623[+]                 fd = squat_trie_create_fd(trie, path, O_TRUNC);
 1624                  if (fd == -1)
 1625                          return -1;
 1626   
 1627                  if (trie->lock_method != FILE_LOCK_METHOD_DOTLOCK) {
 1628                          ret = file_wait_lock(fd, path, F_WRLCK,
 1629                                               trie->lock_method,
 1630                                               SQUAT_TRIE_LOCK_TIMEOUT,
 1631[+]                                              &file_lock);
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  




Change Warning 11950.25516 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: