(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/plugins/virtual/virtual-sync.c) |
| |
| 1260 | | | virtual_sync_apply_existing_appends(struct virtual_sync_context *ctx) |
| 1261 | | | { |
| 1262 | | | uint32_t virtual_ext_id = ctx->mbox->virtual_ext_id; |
| 1263 | | | struct virtual_backend_box *bbox = NULL; |
| 1264 | | | const struct *hdr; |
| 1265 | | | const struct virtual_mail_index_record *vrec; |
| 1266 | | | struct virtual_backend_uidmap uidmap; |
| 1267 | | | const void *data; |
| 1268 | | | bool expunged; |
| 1269 | | | uint32_t seq, seq2; |
| 1270 | | | |
| 1271 | | | if (!ctx->mbox->uids_mapped) |
Event 1:
Skipping " if". ctx->mbox->uids_mapped evaluates to true.
hide
|
|
| 1272 | | | return; |
| 1273 | | | |
| 1274 | | | hdr = (ctx->sync_view); |
| 1275 | | | if (ctx->mbox->sync_virtual_next_uid >= hdr->next_uid) |
Event 2:
Skipping " if". ctx->mbox->sync_virtual_next_uid >= hdr->next_uid evaluates to false.
hide
|
|
| 1276 | | | return; |
| 1277 | | | |
| 1278 | | | |
| 1279 | | | |
| 1280 | | | if (!mail_index_lookup_seq_range(ctx->sync_view, |
| 1281 | | | ctx->mbox->sync_virtual_next_uid, |
| 1282 | [+] | | (uint32_t)-1, &seq, &seq2)) |
 |
| 1283 | | | return; |
| 1284 | | | |
| 1285 | | | memset(&uidmap, 0, sizeof(uidmap)); |
| 1286 | | | for (; seq <= seq2; seq++) { |
Event 5:
Entering loop body. seq <= seq2 evaluates to true.
hide
|
|
| 1287 | | | mail_index_lookup_ext(ctx->sync_view, seq, virtual_ext_id, |
| 1288 | | | &data, &expunged); |
| 1289 | | | vrec = data; |
| 1290 | | | uidmap.real_uid = vrec->real_uid; |
| 1291 | | | mail_index_lookup_uid(ctx->sync_view, seq, &uidmap.virtual_uid); |
| 1292 | | | |
| 1293 | | | if (bbox == NULL || bbox->mailbox_id != vrec->mailbox_id) { |
Event 6:
Taking true branch. bbox == (void *)0 evaluates to true.
hide
|
|
| 1294 | | | bbox = virtual_backend_box_lookup(ctx->mbox, |
Event 9:
bbox is set to virtual_backend_box_lookup(...), which evaluates to NULL. See related event 8.
hide
|
|
| 1295 | [+] | | vrec->mailbox_id); |
 |
| 1296 | | | } |
| 1297 | [+] | | array_append(&bbox->uids, &uidmap, 1);
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/array.h |
| |
116 | #define array_append(array, data, count) \ |
117 | array_append_i(&(array)->arr + ARRAY_TYPE_CHECK(array, data), \ |
118 | data, count) |
| |
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/array.h |
| |
47 | # define ARRAY_TYPE_CHECK(array, data) \ |
48 | COMPILE_ERROR_IF_TYPES_NOT_COMPATIBLE( \ |
49 | **(array)->v_modifiable, *data) |
| |
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) |
| |
|
Event 10:
&bbox->uids, which evaluates to 40, is passed to array_append_i() as the first argument. See related event 9.
hide
|
|
 |
| |