(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-imap/imap-id.c) |
| |
| 128 | | | const char *imap_id_args_get_log_reply(const struct imap_arg *args, |
| 129 | | | const char *settings) |
| 130 | | | { |
| 131 | | | const char *const *keys, *key, *value; |
| 132 | | | string_t *reply; |
| 133 | | | bool log_all; |
| 134 | | | |
| 135 | | | if (settings == NULL || *settings == '\0' || |
Event 1:
Skipping " if". - settings == (void *)0 evaluates to false.
- *settings == 0 evaluates to false.
- args->type != IMAP_ARG_LIST evaluates to false.
hide
|
|
| 136 | | | args->type != IMAP_ARG_LIST)
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-imap/imap-parser.h |
| |
83 | #define IMAP_ARG_LIST(arg) \ |
84 | ((arg)->type == IMAP_ARG_LIST ? \ |
85 | &(arg)->_data.list : imap_arg_list_error(arg)) |
| |
|
| 137 | | | return NULL; |
| 138 | | | |
| 139 | | | args = IMAP_ARG_LIST_ARGS(args);
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/array.h |
| |
165 | #define array_idx(array, idx) \ |
166 | ARRAY_TYPE_CAST_CONST(array)array_idx_i(&(array)->arr, idx) |
| |
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/array.h |
| |
43 | # define ARRAY_TYPE_CAST_CONST(array) \ |
44 | (typeof(*(array)->v)) |
| |
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-imap/imap-parser.h |
| |
83 | #define IMAP_ARG_LIST(arg) \ |
84 | ((arg)->type == IMAP_ARG_LIST ? \ |
85 | &(arg)->_data.list : imap_arg_list_error(arg)) |
| |
|
Event 2:
args->type == IMAP_ARG_LIST evaluates to true.
hide
|
|
| 140 | | | |
| 141 | | | log_all = strcmp(settings, "*") == 0; |
Event 3:
strcmp(settings, "*") == 0 evaluates to true.
hide
|
|
| 142 | [+] | | reply = t_str_new(256); |
 |
| 143 | | | keys = t_strsplit_spaces(settings, " "); |
| 144 | | | while (args->type != IMAP_ARG_EOL && args[1].type != IMAP_ARG_EOL) { |
| 145 | | | if (args->type != IMAP_ARG_STRING) { |
Event 7:
Skipping " if". args->type != IMAP_ARG_STRING evaluates to false.
hide
|
|
| 146 | | | |
| 147 | | | args += 2; |
| 148 | | | continue; |
| 149 | | | } |
| 150 | | | key = IMAP_ARG_STR_NONULL(args);
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-imap/imap-parser.h |
| |
73 | #define IMAP_ARG_STR_NONULL(arg) \ |
74 | ((arg)->type == IMAP_ARG_ATOM || (arg)->type == IMAP_ARG_STRING || \ |
75 | (arg)->type == IMAP_ARG_LITERAL ? \ |
76 | (arg)->_data.str : imap_arg_str_error(arg)) |
| |
|
Event 8:
args->type == IMAP_ARG_ATOM evaluates to false.
hide
Event 9:
args->type == IMAP_ARG_STRING evaluates to true.
hide
|
|
| 151 | | | args++; |
| 152 | | | if (strlen(key) > 30) { |
Event 10:
Skipping " if". strlen(key) > 30 evaluates to false.
hide
|
|
| 153 | | | |
| 154 | | | |
| 155 | | | args++; |
| 156 | | | continue; |
| 157 | | | } |
| 158 | | | |
| 159 | | | if (log_all || str_array_icase_find(keys, key)) { |
Event 11:
Taking true branch. log_all evaluates to true.
hide
|
|
| 160 | | | if (IMAP_ARG_TYPE_IS_STRING(args->type))
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-imap/imap-parser.h |
| |
64 | #define IMAP_ARG_TYPE_IS_STRING(type) \ |
65 | ((type) == IMAP_ARG_ATOM || (type) == IMAP_ARG_STRING || \ |
66 | (type) == IMAP_ARG_LITERAL) |
| |
|
Event 12:
Taking true branch. args->type == IMAP_ARG_ATOM evaluates to true.
hide
|
|
| 161 | | | value = IMAP_ARG_STR_NONULL(args);
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-imap/imap-parser.h |
| |
73 | #define IMAP_ARG_STR_NONULL(arg) \ |
74 | ((arg)->type == IMAP_ARG_ATOM || (arg)->type == IMAP_ARG_STRING || \ |
75 | (arg)->type == IMAP_ARG_LITERAL ? \ |
76 | (arg)->_data.str : imap_arg_str_error(arg)) |
| |
|
Event 13:
args->type == IMAP_ARG_ATOM evaluates to true.
hide
|
|
| 162 | | | else if (args->type == IMAP_ARG_NIL) |
| 163 | | | value = "NIL"; |
| 164 | | | else |
| 165 | | | value = ""; |
| 166 | | | if (str_len(reply) > 0) |
Event 14:
Skipping " if". str_len(reply) > 0 evaluates to false.
hide
|
|
| 167 | | | str_append(reply, ", "); |
| 168 | | | str_append(reply, str_sanitize(key, 30)); |
| 169 | | | str_append_c(reply, '='); |
| 170 | [+][+] | | str_append(reply, str_sanitize(value, 80)); |
 |
 |
| |