(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/list/mailbox-list-fs-iter.c) |
| |
| 483 | | | list_file_subdir(struct fs_list_iterate_context *ctx, |
| 484 | | | enum imap_match_result match, const char *list_path, |
| 485 | | | const char *fname) |
| 486 | | | { |
| 487 | | | struct list_dir_context *dir; |
| 488 | | | DIR *dirp; |
| 489 | | | enum imap_match_result match2; |
| 490 | | | const char *vpath, *real_path; |
| 491 | | | bool scan_subdir, delayed_send = FALSE; |
| 492 | | | int ret; |
| 493 | | | |
| 494 | | | vpath = t_strdup_printf("%s%c", list_path, ctx->sep); |
| 495 | | | match2 = imap_match(ctx->glob, vpath); |
| 496 | | | |
| 497 | | | if (match == IMAP_MATCH_YES) |
Event 1:
Taking true branch. match == IMAP_MATCH_YES evaluates to true.
hide
|
|
| 498 | | | ctx->info.name = p_strdup(ctx->info_pool, list_path); |
| 499 | | | else if (match2 == IMAP_MATCH_YES) |
| 500 | | | ctx->info.name = p_strdup(ctx->info_pool, vpath); |
| 501 | | | else |
| 502 | | | ctx->info.name = NULL; |
| 503 | | | |
| 504 | | | scan_subdir = (match2 & (IMAP_MATCH_YES | IMAP_MATCH_CHILDREN)) != 0; |
Event 2:
(match2 & (IMAP_MATCH_YES | IMAP_MATCH_CHILDREN)) != 0 evaluates to true.
hide
|
|
| 505 | | | if ((match == IMAP_MATCH_YES || scan_subdir) && |
Event 3:
Skipping " if". - match == IMAP_MATCH_YES evaluates to true.
- ctx->info.name != (void *)0 evaluates to true.
- (ctx->ctx.flags & MAILBOX_LIST_ITER_RETURN_CHILDREN) != 0 evaluates to false.
hide
|
|
| 506 | | | ctx->info.name != NULL && |
| 507 | | | (ctx->ctx.flags & MAILBOX_LIST_ITER_RETURN_CHILDREN) != 0 && |
| 508 | | | (ctx->info.flags & (MAILBOX_CHILDREN | MAILBOX_NOCHILDREN)) == 0) { |
| 509 | | | scan_subdir = TRUE; |
| 510 | | | delayed_send = TRUE; |
| 511 | | | } |
| 512 | | | |
| 513 | | | if (scan_subdir) { |
Event 4:
Taking true branch. scan_subdir evaluates to true.
hide
|
|
| 514 | [+] | | real_path = t_strconcat(ctx->dir->real_path, "/", fname, NULL); |
 |
| 515 | [+] | | ret = list_opendir(ctx, real_path, vpath, &dirp); |
Event 11:
real_path, which evaluates to NULL, is passed to list_opendir() as the second argument. See related event 10.
hide
|
|
 |
| |