(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/plugins/expire/expire-plugin.c) |
| |
| 247 | | | static struct mailbox * |
| 248 | | | expire_mailbox_open(struct mail_storage *storage, const char *name, |
| 249 | | | struct istream *input, enum mailbox_open_flags flags) |
| 250 | | | { |
| 251 | | | union mail_storage_module_context *xpr_storage = |
| 252 | | | EXPIRE_CONTEXT(storage);
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/module-context.h |
| |
46 | #define MODULE_CONTEXT(obj, id_ctx) \ |
47 | (*((void **)array_idx_modifiable(&(obj)->module_contexts, \ |
48 | (id_ctx).id.module_id) + \ |
49 | OBJ_REGISTER_COMPATIBLE(obj, id_ctx))) |
| |
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/array.h |
| |
179 | #define array_idx_modifiable(array, idx) \ |
180 | ARRAY_TYPE_CAST_MODIFIABLE(array) \ |
181 | array_idx_modifiable_i(&(array)->arr, idx) |
| |
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/array.h |
| |
45 | # define ARRAY_TYPE_CAST_MODIFIABLE(array) \ |
46 | (typeof(*(array)->v_modifiable)) |
| |
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) |
| |
|
| 253 | | | struct mailbox *box; |
| 254 | | | string_t *vname; |
| 255 | | | unsigned int secs; |
| 256 | | | bool altmove; |
| 257 | | | |
| 258 | | | box = xpr_storage->super.mailbox_open(storage, name, input, flags); |
| 259 | | | if (box != NULL) { |
| 260 | | | vname = t_str_new(128); |
| 261 | | | (void)mail_namespace_get_vname(storage->ns, vname, name); |
Unreachable Call
The highlighted code will not execute under any circumstances. This may be because of: |
|
| 262 | | | |
| 263 | | | secs = expire_box_find_min_secs(expire.env, str_c(vname), |
| 264 | | | &altmove); |
| 265 | | | if (secs != 0) |
| 266 | | | mailbox_expire_hook(box, secs, altmove); |
| 267 | | | } |
| 268 | | | return box; |
| 269 | | | } |
| |