(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/imap/cmd-status.c) |
| |
| 9 | | | bool cmd_status(struct client_command_context *cmd) |
| 10 | | | { |
| 11 | | | struct client *client = cmd->client; |
| 12 | | | const struct imap_arg *args; |
| 13 | | | struct mailbox_status status; |
| 14 | | | enum mailbox_status_items items; |
| 15 | | | struct mail_storage *storage; |
| 16 | | | const char *mailbox, *real_mailbox; |
| 17 | | | bool selected_mailbox; |
| 18 | | | |
| 19 | | | |
| 20 | [+] | | if (!client_read_args(cmd, 2, 0, &args)) |
 |
| 21 | | | return FALSE; |
| 22 | | | |
| 23 | [+] | | mailbox = real_mailbox = imap_arg_string(&args[0]); |
 |
| 24 | | | if (mailbox == NULL || args[1].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)) |
| |
|
Event 15:
Skipping " if". - mailbox == (void *)0 evaluates to false.
- args[1].type != IMAP_ARG_LIST evaluates to false.
hide
|
|
| 25 | | | client_send_command_error(cmd, "Status items must be list."); |
| 26 | | | return TRUE; |
| 27 | | | } |
| 28 | | | |
| 29 | | | |
| 30 | | | if (imap_status_parse_items(cmd, IMAP_ARG_LIST_ARGS(&args[1]),
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 16:
Skipping " if". (&args[1])->type == IMAP_ARG_LIST evaluates to true.
hide
|
|
| 31 | [+] | | &items) < 0) |
 |
| 32 | | | return TRUE; |
| 33 | | | |
| 34 | | | storage = client_find_storage(cmd, &real_mailbox); |
| 35 | | | if (storage == NULL) |
Event 19:
Skipping " if". storage == (void *)0 evaluates to false.
hide
|
|
| 36 | | | return TRUE; |
| 37 | | | |
| 38 | | | selected_mailbox = client->mailbox != NULL && |
Event 20:
client->mailbox != (void *)0 evaluates to true.
hide
|
|
| 39 | | | mailbox_equals(client->mailbox, storage, real_mailbox); |
Event 21:
mailbox_equals(...) evaluates to false.
hide
|
|
| 40 | [+] | | if (!imap_status_get(client, storage, real_mailbox, items, &status)) { |
Event 22:
The resource of interest is allocated inside imap_status_get().
hide
|
|
 |
| |