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

index_mailbox_list_open_indexes

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/list/index-mailbox-list.c)expand/collapse
Show more  
 454  static int index_mailbox_list_open_indexes(struct mailbox_list *list,
 455                                             const char *dir)
 456  {
 457          struct index_mailbox_list *ilist = INDEX_LIST_CONTEXT(list);
 458          const char *path;
 459          enum mail_index_open_flags index_flags;
 460          enum mail_storage_flags storage_flags;
 461          int ret;
 462   
 463          /* FIXME: a bit ugly way to get the flags, but this will do for now.. */
 464          index_flags = MAIL_INDEX_OPEN_FLAG_CREATE;
 465          storage_flags = *list->set.mail_storage_flags;
 466  #ifndef MMAP_CONFLICTS_WRITE 
 467          if ((storage_flags & MAIL_STORAGE_FLAG_MMAP_DISABLE) != 0)
 468  #endif
 469                  index_flags |= MAIL_INDEX_OPEN_FLAG_MMAP_DISABLE;
 470   
 471          if (mail_index_open(ilist->mail_index, index_flags,
 472[+]                             *list->set.lock_method) < 0) {
 473                  if (mail_index_move_to_memory(ilist->mail_index) < 0) {
 474                          /* try opening once more. it should be created
 475                             directly into memory now. */
 476                          ret = mail_index_open(ilist->mail_index, index_flags,
 477                                                *list->set.lock_method);
 478                          if (ret <= 0) {
 479                                  /* everything failed. there's a bug in the
 480                                     code, but just work around it by disabling 
 481                                     the index completely */
 482                                  return -1;
 483                          }
 484                  }
 485          }
 486   
 487[+]         path = t_strconcat(dir, "/"MAILBOX_LIST_INDEX_NAME, NULL);
 488          ilist->list_index = mailbox_list_index_alloc(path, list->hierarchy_sep,
 489[+]                                                      ilist->mail_index);
expand/collapse

mailbox_list_index_alloc

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-index/mailbox-list-index.c)expand/collapse
Show more  
 344  struct mailbox_list_index *
 345  mailbox_list_index_alloc(const char *path, char separator,
 346                           struct mail_index *mail_index)
 347  {
 348          struct mailbox_list_index *index;
 349   
 350          index = i_new(struct mailbox_list_index, 1);
 351[+]         index->filepath = 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 11988.25827 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: