(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/dbox/dbox-storage.c) |
| |
| 610 | | | static int dbox_list_iter_is_mailbox(struct mailbox_list_iterate_context *ctx |
| 611 | | | ATTR_UNUSED, |
| 612 | | | const char *dir, const char *fname, |
| 613 | | | const char *mailbox_name ATTR_UNUSED, |
| 614 | | | enum mailbox_list_file_type type, |
| 615 | | | enum mailbox_info_flags *flags) |
| 616 | | | { |
| 617 | | | const char *path, *maildir_path; |
| 618 | | | struct stat st, st2; |
| 619 | | | int ret = 1; |
| 620 | | | |
| 621 | | | |
| 622 | | | if (type != MAILBOX_LIST_FILE_TYPE_DIR && |
Event 1:
Skipping " if". type != MAILBOX_LIST_FILE_TYPE_DIR evaluates to false.
hide
|
|
| 623 | | | type != MAILBOX_LIST_FILE_TYPE_SYMLINK && |
| 624 | | | type != MAILBOX_LIST_FILE_TYPE_UNKNOWN) { |
| 625 | | | |
| 626 | | | *flags |= MAILBOX_NOSELECT | MAILBOX_NOINFERIORS; |
| 627 | | | return 0; |
| 628 | | | } |
| 629 | | | |
| 630 | | | |
| 631 | [+] | | path = t_strconcat(dir, "/", fname, NULL); |
 |
| 632 | | | if (stat(path, &st) == 0) { |
Event 8:
path, which evaluates to NULL, is passed to stat64() as the first argument. See related event 7.
hide
Null Pointer Dereference
The body of stat64() dereferences path, but it is NULL. The issue can occur if the highlighted code executes. See related event 8. Show: All events | Only primary events |
|
| |