(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/list/mailbox-list-fs-iter.c) |
| |
| 540 | | | list_file(struct fs_list_iterate_context *ctx, |
| 541 | | | const struct list_dir_entry *entry) |
| 542 | | | { |
| 543 | | | struct mail_namespace *ns = ctx->ctx.list->ns; |
| 544 | | | const char *fname = entry->fname; |
| 545 | | | const char *list_path; |
| 546 | | | enum imap_match_result match; |
| 547 | | | int ret; |
| 548 | | | |
| 549 | | | |
| 550 | | | if (fname[0] == '.' && |
Event 1:
Skipping " if". fname[0] == 46 evaluates to false.
hide
|
|
| 551 | | | (fname[1] == '\0' || |
| 552 | | | (fname[1] == '.' && fname[2] == '\0'))) |
| 553 | | | return 0; |
| 554 | | | |
| 555 | | | |
| 556 | [+] | | list_path = t_strconcat(ctx->dir->virtual_path, fname, NULL); |
 |
| 557 | [+] | | match = imap_match(ctx->glob, list_path); |
 |
| 558 | | | if (match != IMAP_MATCH_YES && (match & IMAP_MATCH_CHILDREN) == 0 && |
Event 10:
Skipping " if". match != IMAP_MATCH_YES evaluates to false.
hide
|
|
| 559 | | | !ctx->dir->delayed_send) |
| 560 | | | return 0; |
| 561 | | | |
| 562 | | | if (strcmp(fname, ctx->ctx.list->set.maildir_name) == 0) { |
Event 11:
Skipping " if". strcmp(...) == 0 evaluates to false.
hide
|
|
| 563 | | | |
| 564 | | | return 0; |
| 565 | | | } |
| 566 | | | |
| 567 | | | |
| 568 | | | ctx->info.flags = 0; |
| 569 | | | ret = ctx->ctx.list->v. |
| 570 | | | iter_is_mailbox(&ctx->ctx, ctx->dir->real_path, fname, |
| 571 | | | list_path, entry->type, &ctx->info.flags); |
| 572 | | | if (ret <= 0) |
Event 12:
Skipping " if". ret <= 0 evaluates to false.
hide
|
|
| 573 | | | return ret; |
| 574 | | | |
| 575 | | | if (ctx->dir->delayed_send) { |
Event 13:
Skipping " if". ctx->dir->delayed_send evaluates to false.
hide
|
|
| 576 | | | |
| 577 | | | |
| 578 | | | ctx->dir->delayed_send = FALSE; |
| 579 | | | if (match == IMAP_MATCH_YES || |
| 580 | | | (match & IMAP_MATCH_CHILDREN) != 0) |
| 581 | | | ctx->dir->next_entry = entry; |
| 582 | | | ctx->info = ctx->dir->info; |
| 583 | | | ctx->info.flags |= MAILBOX_CHILDREN; |
| 584 | | | return 1; |
| 585 | | | } |
| 586 | | | |
| 587 | | | ctx->info.flags |= fs_list_get_subscription_flags(ctx, list_path); |
| 588 | | | |
| 589 | | | |
| 590 | | | if ((ns->flags & NAMESPACE_FLAG_INBOX) != 0) { |
Event 14:
Taking true branch. (ns->flags & NAMESPACE_FLAG_INBOX) != 0 evaluates to true.
hide
|
|
| 591 | | | if (strcasecmp(list_path, "INBOX") == 0) { |
Event 15:
list_path, which evaluates to NULL, is passed to strcasecmp() as the first argument. See related event 7.
hide
Null Pointer Dereference
The body of strcasecmp() dereferences list_path, but it is NULL. The issue can occur if the highlighted code executes. See related event 15. Show: All events | Only primary events |
|
| |