(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/list/mailbox-list-subscriptions.c) |
| |
| 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 {
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/data-stack.h |
| |
49 | #define T_BEGIN \ |
50 | STMT_START { unsigned int _data_stack_cur_id = t_push(); |
| |
|
| 41 | | | full_name = name2 = |
| 42 | | | t_strconcat(default_ns->prefix, name, NULL); |
| 43 | | | ns = mail_namespace_find_unsubscribable(namespaces, &name2); |
| 44 | | | if (ns == NULL) |
| 45 | | | ns = default_ns; |
| 46 | | | else if (ns->type == NAMESPACE_SHARED && |
| 47 | | | (ns->flags & NAMESPACE_FLAG_AUTOCREATED) == 0) { |
| 48 | | | |
| 49 | | | (void)mailbox_list_is_valid_existing_name(ns->list, |
| 50 | | | name2); |
| 51 | | | name = full_name; |
| 52 | | | ns = mail_namespace_find_unsubscribable(namespaces, |
| 53 | | | &name); |
| 54 | | | } else { |
| 55 | | | name = name2; |
| 56 | | | } |
| 57 | | | name = mail_namespace_get_vname(ns, vname, name); |
Unreachable Call
The highlighted code will not execute under any circumstances. This may be because of: |
|
| 58 | | | mailbox_list_iter_update(&update_ctx, name); |
| 59 | | | } T_END; |
| 60 | | | return subsfile_list_deinit(subsfile_ctx); |
| 61 | | | } |
| |