(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/plugins/listescape/listescape-plugin.c) |
| |
| 95 | | | static struct mailbox_list_iterate_context * |
| 96 | | | listescape_mailbox_list_iter_init(struct mailbox_list *list, |
| 97 | | | const char *const *patterns, |
| 98 | | | enum mailbox_list_iter_flags flags) |
| 99 | | | { |
| 100 | | | struct listescape_mailbox_list *mlist = LIST_ESCAPE_LIST_CONTEXT(list);
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/plugins/listescape/listescape-plugin.c |
| |
18 | #define LIST_ESCAPE_LIST_CONTEXT(obj) \ |
19 | MODULE_CONTEXT(obj, listescape_list_module) |
| |
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) |
| |
|
| 101 | | | struct mailbox_list_iterate_context *ctx; |
| 102 | | | const char **escaped_patterns; |
| 103 | | | unsigned int i; |
| 104 | | | |
| 105 | | | t_push(); |
Ignored Return Value
The return value of t_push() is never checked in the highlighted execution scenario. - If the return value can indicate an error, the error will be ignored if the highlighted code executes.
- The return value of t_push() is checked 99% of the time in this project. CodeSonar is configured to enforce Ignored Return Value checks for any function whose return value is checked at least 96% of the time, unless the function is used fewer than 20 times. (To modify these thresholds, use configuration file parameters RETURN_CHECKER_SAMPLE_SIZE and RETURN_CHECKER_RATIO. To exempt t_push() from the Ignored Return Value check, use configuration file parameter RETURN_CHECKER_IGNORED_FUNCS).
Show: All events | Only primary events |
|
| 106 | | | if ((flags & MAILBOX_LIST_ITER_VIRTUAL_NAMES) != 0) { |
Event 2:
Taking true branch. (flags & MAILBOX_LIST_ITER_VIRTUAL_NAMES) != 0 evaluates to true.
hide
|
|
| 107 | | | escaped_patterns = t_new(const char *,
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/data-stack.h |
| |
75 | #define t_new(type, count) \ |
76 | ((type *) t_malloc0(sizeof(type) * (count))) |
| |
|
| 108 | | | str_array_length(patterns) + 1); |
| 109 | | | for (i = 0; patterns[i] != NULL; i++) { |
| 110 | | | escaped_patterns[i] = |
| 111 | | | list_escape(list->ns, patterns[i], FALSE); |
| 112 | | | } |
| 113 | | | patterns = escaped_patterns; |
| 114 | | | } |
| 115 | | | |
| 116 | | | |
| 117 | | | |
| 118 | | | |
| 119 | | | |
| 120 | | | list->ns->real_sep = list->hierarchy_sep; |
| 121 | | | ctx = mlist->module_ctx.super.iter_init(list, patterns, flags); |
| 122 | | | list->ns->real_sep = list->ns->sep; |
| 123 | | | t_pop(); |
| 124 | | | return ctx; |
| 125 | | | } |
| |