(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/list/index-mailbox-list.c) |
| |
| 503 | | | static void index_mailbox_list_created(struct mailbox_list *list) |
| 504 | | | { |
| 505 | | | struct index_mailbox_list *ilist = NULL; |
| 506 | | | const char *dir; |
| 507 | | | |
| 508 | | | |
| 509 | | | dir = mailbox_list_get_path(list, NULL, MAILBOX_LIST_PATH_TYPE_INDEX); |
| 510 | | | if (*dir == '\0' || getenv("MAILBOX_LIST_INDEX_DISABLE") != NULL || |
| 511 | | | strcmp(list->name, "maildir++") != 0 || 1) { |
| 512 | | | |
| 513 | | | |
| 514 | | | MODULE_CONTEXT_SET(list, index_mailbox_list_module, ilist);
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/module-context.h |
| |
96 | #define MODULE_CONTEXT_SET(obj, id_ctx, context) \ |
97 | MODULE_CONTEXT_SET_FULL(obj, id_ctx, context, &(context)->module_ctx) |
| |
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/module-context.h |
| |
87 | #define MODULE_CONTEXT_SET_FULL(obj, id_ctx, ctx, module_ctx) STMT_START { \ |
88 | void *_module_tmp = ctx + \ |
89 | COMPILE_ERROR_IF_TYPES_NOT_COMPATIBLE(module_ctx, \ |
90 | (**(obj)->module_contexts.v)) + \ |
91 | OBJ_REGISTER_COMPATIBLE(obj, id_ctx); \ |
92 | array_idx_set_i(&(obj)->module_contexts.arr, \ |
93 | module_get_context_id(&(id_ctx).id), &_module_tmp); \ |
94 | } STMT_END |
| |
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/macros.h |
| |
158 | # define COMPILE_ERROR_IF_TYPES_NOT_COMPATIBLE(_a, _b) \ |
159 | COMPILE_ERROR_IF_TRUE( \ |
160 | !__builtin_types_compatible_p(typeof(_a), typeof(_b))) |
| |
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/macros.h |
| |
156 | # define COMPILE_ERROR_IF_TRUE(condition) \ |
157 | (sizeof(char[1 - 2 * !!(condition)]) - 1) |
| |
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/module-context.h |
| |
43 | #define OBJ_REGISTER_COMPATIBLE(obj, id_ctx) \ |
44 | COMPILE_ERROR_IF_TYPES_NOT_COMPATIBLE(OBJ_REGISTER(obj), (id_ctx).reg) |
| |
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/macros.h |
| |
158 | # define COMPILE_ERROR_IF_TYPES_NOT_COMPATIBLE(_a, _b) \ |
159 | COMPILE_ERROR_IF_TRUE( \ |
160 | !__builtin_types_compatible_p(typeof(_a), typeof(_b))) |
| |
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/macros.h |
| |
156 | # define COMPILE_ERROR_IF_TRUE(condition) \ |
157 | (sizeof(char[1 - 2 * !!(condition)]) - 1) |
| |
|
| 515 | | | return; |
| 516 | | | } |
| 517 | | | |
| 518 | | | ilist = p_new(list->pool, struct index_mailbox_list, 1);
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/mempool.h |
| |
84 | #define p_new(pool, type, count) \ |
85 | ((type *) p_malloc(pool, sizeof(type) * (count))) |
| |
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/mempool.h |
| |
87 | #define p_malloc(pool, size) (pool)->v->malloc(pool, size) |
| |
|
Unreachable Call
The highlighted code will not execute under any circumstances. This may be because of: |
|
| 519 | | | ilist->module_ctx.super = list->v; |
| 520 | | | |
| 521 | | | list->v.deinit = index_mailbox_list_deinit; |
| 522 | | | list->v.iter_init = index_mailbox_list_iter_init; |
| 523 | | | list->v.iter_deinit = index_mailbox_list_iter_deinit; |
| 524 | | | list->v.iter_next = index_mailbox_list_iter_next; |
| 525 | | | MODULE_CONTEXT_SET(list, index_mailbox_list_module, ilist);
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/module-context.h |
| |
96 | #define MODULE_CONTEXT_SET(obj, id_ctx, context) \ |
97 | MODULE_CONTEXT_SET_FULL(obj, id_ctx, context, &(context)->module_ctx) |
| |
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/module-context.h |
| |
87 | #define MODULE_CONTEXT_SET_FULL(obj, id_ctx, ctx, module_ctx) STMT_START { \ |
88 | void *_module_tmp = ctx + \ |
89 | COMPILE_ERROR_IF_TYPES_NOT_COMPATIBLE(module_ctx, \ |
90 | (**(obj)->module_contexts.v)) + \ |
91 | OBJ_REGISTER_COMPATIBLE(obj, id_ctx); \ |
92 | array_idx_set_i(&(obj)->module_contexts.arr, \ |
93 | module_get_context_id(&(id_ctx).id), &_module_tmp); \ |
94 | } STMT_END |
| |
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/macros.h |
| |
158 | # define COMPILE_ERROR_IF_TYPES_NOT_COMPATIBLE(_a, _b) \ |
159 | COMPILE_ERROR_IF_TRUE( \ |
160 | !__builtin_types_compatible_p(typeof(_a), typeof(_b))) |
| |
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/macros.h |
| |
156 | # define COMPILE_ERROR_IF_TRUE(condition) \ |
157 | (sizeof(char[1 - 2 * !!(condition)]) - 1) |
| |
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/module-context.h |
| |
43 | #define OBJ_REGISTER_COMPATIBLE(obj, id_ctx) \ |
44 | COMPILE_ERROR_IF_TYPES_NOT_COMPATIBLE(OBJ_REGISTER(obj), (id_ctx).reg) |
| |
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/macros.h |
| |
158 | # define COMPILE_ERROR_IF_TYPES_NOT_COMPATIBLE(_a, _b) \ |
159 | COMPILE_ERROR_IF_TRUE( \ |
160 | !__builtin_types_compatible_p(typeof(_a), typeof(_b))) |
| |
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/macros.h |
| |
156 | # define COMPILE_ERROR_IF_TRUE(condition) \ |
157 | (sizeof(char[1 - 2 * !!(condition)]) - 1) |
| |
|
| 526 | | | |
| 527 | | | ilist->mail_index = mail_index_alloc(dir, MAIL_INDEX_PREFIX); |
| 528 | | | |
| 529 | | | |
| 530 | | | |
| 531 | | | |
| 532 | | | index_mailbox_list_sync_init_list(list); |
| 533 | | | |
| 534 | | | if (index_mailbox_list_open_indexes(list, dir) < 0) { |
| 535 | | | list->v = ilist->module_ctx.super; |
| 536 | | | mail_index_free(&ilist->mail_index); |
| 537 | | | MODULE_CONTEXT_UNSET(list, index_mailbox_list_module);
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/module-context.h |
| |
101 | #define MODULE_CONTEXT_UNSET(obj, id_ctx) \ |
102 | array_idx_clear(&(obj)->module_contexts, (id_ctx).id.module_id) |
| |
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/array.h |
| |
189 | #define array_idx_clear(array, idx) \ |
190 | array_idx_clear_i(&(array)->arr, idx) |
| |
|
| 538 | | | } |
| 539 | | | } |
| |