(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/maildir/maildir-storage.c) |
| |
| 188 | | | maildir_create(struct mail_storage *_storage, const char *data, |
| 189 | | | const char **error_r) |
| 190 | | | { |
| 191 | | | struct maildir_storage *storage = (struct maildir_storage *)_storage; |
| 192 | | | enum mail_storage_flags flags = _storage->flags; |
| 193 | | | struct mailbox_list_settings list_set; |
| 194 | | | struct mailbox_list *list; |
| 195 | | | const char *layout, *dir; |
| 196 | | | struct stat st; |
| 197 | | | |
| 198 | | | if (maildir_get_list_settings(&list_set, data, _storage, &layout, |
Event 1:
&list_set is passed to maildir_get_list_settings() as the first argument.
hide
|
|
| 199 | [+] | | error_r) < 0) |
 |
| 200 | | | return -1; |
| 201 | | | list_set.mail_storage_flags = &_storage->flags; |
| 202 | | | list_set.lock_method = &_storage->lock_method; |
| 203 | | | |
| 204 | | | if (list_set.inbox_path == NULL && |
Event 63:
Skipping " if". list_set.inbox_path == (void *)0 evaluates to false.
hide
|
|
| 205 | | | strcmp(layout, MAILDIR_PLUSPLUS_DRIVER_NAME) == 0 && |
| 206 | | | (_storage->ns->flags & NAMESPACE_FLAG_INBOX) != 0) { |
| 207 | | | |
| 208 | | | list_set.inbox_path = list_set.root_dir; |
| 209 | | | } |
| 210 | | | |
| 211 | | | if ((flags & MAIL_STORAGE_FLAG_NO_AUTOCREATE) != 0) { |
Event 64:
Taking true branch. (flags & MAIL_STORAGE_FLAG_NO_AUTOCREATE) != 0 evaluates to true.
hide
|
|
| 212 | | | if (stat(list_set.root_dir, &st) == 0) { |
Event 65:
list_set.root_dir, which evaluates to the value assigned to mem at strfuncs.c:43, is passed to stat64() as the first argument. See related event 56.
hide
Event 66:
stat64() accesses the file named list_set.root_dir, where list_set.root_dir is the value assigned to mem at strfuncs.c:43. - 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 65.
hide
Event 67:
Taking false branch. stat(...) == 0 evaluates to false.
hide
|
|
| 213 | | | |
| 214 | | | } else if (errno == EACCES) {
x /usr/include/asm-generic/errno-base.h |
| |
16 | #define EACCES 13 /* Permission denied */ |
| |
|
Event 68:
Taking true branch. errno == 13 evaluates to true.
hide
|
|
| 215 | | | *error_r = mail_error_eacces_msg("stat", |
| 216 | [+] | | list_set.root_dir); |
Event 69:
list_set.root_dir, which evaluates to the value assigned to mem at strfuncs.c:43, is passed to mail_error_eacces_msg() as the second argument. See related event 56.
hide
|
|
 |
| |