(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/index-mail.c) |
| |
| 943 | | | int index_mail_get_special(struct mail *_mail, |
| 944 | | | enum mail_fetch_field field, const char **value_r) |
| 945 | | | { |
| 946 | | | struct index_mail *mail = (struct index_mail *)_mail; |
Event 1:
mail is set to _mail.
hide
|
|
| 947 | | | struct index_mail_data *data = &mail->data; |
Event 2:
data is set to &mail->data, which evaluates to &_mail[7].transaction. See related event 1.
hide
|
|
| 948 | | | struct mail_cache_field *cache_fields = mail->ibox->cache_fields; |
| 949 | | | string_t *str; |
| 950 | | | const void *ext_data; |
| 951 | | | |
| 952 | | | switch (field) { |
Event 3:
field evaluates to 4096.
hide
|
|
| 953 | | | case MAIL_FETCH_IMAP_BODY: { |
| 954 | | | unsigned int body_cache_field = |
| 955 | | | cache_fields[MAIL_CACHE_IMAP_BODY].idx; |
| 956 | | | unsigned int bodystructure_cache_field = |
| 957 | | | cache_fields[MAIL_CACHE_IMAP_BODYSTRUCTURE].idx; |
| 958 | | | |
| 959 | | | if (data->body != NULL) { |
Event 4:
Skipping " if". data->body != (void *)0 evaluates to false.
hide
|
|
| 960 | | | *value_r = data->body; |
| 961 | | | return 0; |
| 962 | | | } |
| 963 | | | |
| 964 | | | |
| 965 | | | |
| 966 | | | |
| 967 | | | |
| 968 | | | |
| 969 | | | |
| 970 | | | str = str_new(mail->data_pool, 128); |
| 971 | | | if ((mail->data.cache_flags & |
| 972 | | | MAIL_CACHE_FLAG_TEXT_PLAIN_7BIT_ASCII) != 0 && |
Event 5:
Taking false branch. (mail->data.cache_flags & MAIL_CACHE_FLAG_TEXT_PLAIN_7BIT_ASCII) != 0 evaluates to false.
hide
|
|
| 973 | | | get_cached_parts(mail)) { |
| 974 | | | index_mail_get_plain_bodystructure(mail, str, FALSE); |
| 975 | | | data->body = str_c(str); |
| 976 | | | } else if (index_mail_cache_lookup_field(mail, str, |
| 977 | [+] | | body_cache_field) > 0) |
 |
| 978 | | | data->body = str_c(str); |
| 979 | | | else if (index_mail_cache_lookup_field(mail, str, |
| 980 | [+] | | bodystructure_cache_field) > 0) { |
 |
| 981 | | | data->bodystructure = |
Event 25:
data->bodystructure is set to p_strdup(...), which evaluates to NULL, where data is &_mail[7].transaction. See related events 2 and 24.
hide
|
|
| 982 | [+] | | p_strdup(mail->data_pool, str_c(str)); |
 |
| 983 | | | str_truncate(str, 0); |
| 984 | | | |
| 985 | | | if (imap_body_parse_from_bodystructure( |
| 986 | [+] | | data->bodystructure, str)) |
Event 26:
data->bodystructure, which evaluates to NULL, is passed to imap_body_parse_from_bodystructure() as the first argument. See related events 2 and 25.
hide
|
|
 |
| |