(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/cydir/cydir-storage.c) |
| |
| 220 | | | static int cydir_mailbox_create(struct mail_storage *_storage, |
| 221 | | | const char *name, |
| 222 | | | bool directory ATTR_UNUSED) |
| 223 | | | { |
| 224 | | | const char *path; |
| 225 | | | struct stat st; |
| 226 | | | |
| 227 | | | path = mailbox_list_get_path(_storage->list, name, |
Event 2:
path is set to mailbox_list_get_path(...), which evaluates to list->v.get_path(...) from mailbox-list.c:446. See related event 1.
hide
|
|
| 228 | [+] | | MAILBOX_LIST_PATH_TYPE_MAILBOX); |
 |
| 229 | | | if (stat(path, &st) == 0) { |
Event 3:
path, which evaluates to list->v.get_path(...) from mailbox-list.c:446, is passed to stat64() as the first argument. See related event 2.
hide
Event 4:
stat64() accesses the file named path, where path is list->v.get_path(...) from mailbox-list.c:446. - The same name is used to access a file later, but it is not safe to assume that it will be the same underlying file.
See related event 3.
hide
Event 5:
Skipping " if". stat(path, &st) == 0 evaluates to false.
hide
|
|
| 230 | | | mail_storage_set_error(_storage, MAIL_ERROR_EXISTS, |
| 231 | | | "Mailbox already exists"); |
| 232 | | | return -1; |
| 233 | | | } |
| 234 | | | |
| 235 | [+] | | return create_cydir(_storage, path); |
Event 6:
path, which evaluates to list->v.get_path(...) from mailbox-list.c:446, is passed to create_cydir() as the second argument. See related events 2 and 3.
hide
|
|
 |
| |