Text   |  XML   |  ReML   |   Visible Warnings:

Null Pointer Dereference  at mail-namespace.c:383

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

mailbox_list_subscriptions_fill_real

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/list/mailbox-list-subscriptions.c)expand/collapse
Show more  
 10  mailbox_list_subscriptions_fill_real(struct mailbox_list_iterate_context *ctx,
 11                                       struct mailbox_tree_context *tree_ctx,
 12                                       struct imap_match_glob *glob,
 13                                       bool update_only)
 14  {
 15          struct mail_namespace *default_ns = ctx->list->ns;
 16          struct mail_namespace *namespaces = default_ns->user->namespaces;
 17          struct mailbox_list_iter_update_context update_ctx;
 18          struct subsfile_list_context *subsfile_ctx;
 19          struct mail_namespace *ns;
 20          const char *path, *name, *name2, *full_name;
 21          string_t *vname;
 22   
 23          vname = t_str_new(256);
 24          path = t_strconcat(ctx->list->set.control_dir != NULL ?
 25                             ctx->list->set.control_dir :
 26                             ctx->list->set.root_dir,
 27                             "/", ctx->list->set.subscription_fname, NULL);
 28          subsfile_ctx = subsfile_list_init(ctx->list, path);
 29   
 30          memset(&update_ctx, 0, sizeof(update_ctx));
 31          update_ctx.iter_ctx = ctx;
 32          update_ctx.tree_ctx = tree_ctx;
 33          update_ctx.glob = glob;
 34          update_ctx.leaf_flags = MAILBOX_SUBSCRIBED;
 35          update_ctx.parent_flags = MAILBOX_CHILD_SUBSCRIBED;
 36          update_ctx.update_only = update_only;
 37          update_ctx.match_parents =
 38                  (ctx->flags & MAILBOX_LIST_ITER_SELECT_RECURSIVEMATCH) != 0;
 39   
 40[+]         while ((name = subsfile_list_next(subsfile_ctx)) != NULL) T_BEGIN {
 41                  full_name = name2 =
 42[+]                         t_strconcat(default_ns->prefix, name, NULL);
 43[+]                 ns = mail_namespace_find_unsubscribable(namespaces, &name2);
expand/collapse

mail_namespace_find_unsubscribable

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/mail-namespace.c)expand/collapse
Show more  
 444  struct mail_namespace *
 445  mail_namespace_find_unsubscribable(struct mail_namespace *namespaces,
 446                                     const char **mailbox)
 447  {
 448          return mail_namespace_find_mask(namespaces, mailbox,
 449[+]                                         0, NAMESPACE_FLAG_SUBSCRIPTIONS);
expand/collapse

mail_namespace_find_mask

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/mail-namespace.c)expand/collapse
Show more  
 371  static struct mail_namespace *
 372  mail_namespace_find_mask(struct mail_namespace *namespaces,
 373                           const char **mailbox,
 374                           enum namespace_flags flags,
 375                           enum namespace_flags mask)
 376  {
 377          struct mail_namespace *ns = namespaces;
 378          const char *box = *mailbox;
 379          struct mail_namespace *best = NULL;
 380          size_t best_len = 0;
 381          bool inbox;
 382   
 383          inbox = strncasecmp(box, "INBOX", 5) == 0;
Show more  
Show more  
Show more  




Change Warning 7273.25006 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: