Text   |  XML   |  ReML   |   Visible Warnings:

Unreachable Data Flow  at acl-mailbox-list.c:105

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

acl_mailbox_try_list_fast

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/plugins/acl/acl-mailbox-list.c)expand/collapse
Show more  
 64  acl_mailbox_try_list_fast(struct acl_mailbox_list_iterate_context *ctx)
 65  {
 66          struct acl_mailbox_list *alist = ACL_LIST_CONTEXT(ctx->ctx.list);
 67          struct acl_backend *backend = alist->rights.backend;
 68          const unsigned int *idxp;
 69          const struct acl_mask *acl_mask;
 70          struct acl_mailbox_list_context *nonowner_list_ctx;
 71          struct mail_namespace *ns = ctx->ctx.list->ns;
 72          struct mailbox_list_iter_update_context update_ctx;
 73          const char *name;
 74          string_t *vname = NULL;
 75          int ret;
 76   
 77          if ((ctx->ctx.flags & (MAILBOX_LIST_ITER_RAW_LIST |
 78                                 MAILBOX_LIST_ITER_SELECT_SUBSCRIBED)) != 0)
 79                  return;
 80   
 81          /* if this namespace's default rights contain LOOKUP, we'll need to
 82             go through all mailboxes in any case. */
 83          idxp = alist->rights.acl_storage_right_idx + ACL_STORAGE_RIGHT_LOOKUP;
 84          if (acl_backend_get_default_rights(backend, &acl_mask) < 0 ||
 85              acl_cache_mask_isset(acl_mask, *idxp))
 86                  return;
 87   
 88          /* no LOOKUP right by default, we can optimize this */
 89          if ((ctx->ctx.flags & MAILBOX_LIST_ITER_VIRTUAL_NAMES) != 0)
 90                  vname = t_str_new(256);
 91   
 92          memset(&update_ctx, 0, sizeof(update_ctx));
 93          update_ctx.iter_ctx = &ctx->ctx;
 94          update_ctx.glob =
 95                  imap_match_init(pool_datastack_create(), "*",
 96                                  (ns->flags & NAMESPACE_FLAG_INBOX) != 0,
 97                                  ctx->sep);
 98          update_ctx.match_parents = TRUE;
 99          update_ctx.tree_ctx = mailbox_tree_init(ctx->sep);
 100   
 101          nonowner_list_ctx = acl_backend_nonowner_lookups_iter_init(backend);
 102          while ((ret = acl_backend_nonowner_lookups_iter_next(nonowner_list_ctx,
 103                                                               &name)) > 0) {
 104                  if (vname != NULL)
 105                          name = mail_namespace_get_vname(ns, vname, name);
 106                  mailbox_list_iter_update(&update_ctx, name);
 107          }
 108          acl_backend_nonowner_lookups_iter_deinit(&nonowner_list_ctx);
 109   
 110          if (ret == 0)
 111                  ctx->lookup_boxes = update_ctx.tree_ctx;
 112          else 
 113                  mailbox_tree_deinit(&update_ctx.tree_ctx);
 114  }
Show more  




Change Warning 8051.25013 : Unreachable Data Flow

Priority:
State:
Finding:
Owner:
Note: