(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/maildir/maildir-uidlist.c) |
| |
| 128 | | | static int maildir_uidlist_lock_timeout(struct maildir_uidlist *uidlist, |
| 129 | | | bool nonblock, bool refresh, |
| 130 | | | bool refresh_when_locked) |
| 131 | | | { |
| 132 | | | struct mailbox *box = &uidlist->ibox->box; |
| 133 | | | const char *control_dir, *path; |
| 134 | | | mode_t old_mask; |
| 135 | | | const enum dotlock_create_flags dotlock_flags = |
| 136 | | | nonblock ? DOTLOCK_CREATE_FLAG_NONBLOCK : 0; |
Event 1:
nonblock evaluates to true.
hide
|
|
| 137 | | | int i, ret; |
| 138 | | | |
| 139 | | | if (uidlist->lock_count > 0) { |
Event 2:
Skipping " if". uidlist->lock_count > 0 evaluates to false.
hide
|
|
| 140 | | | if (!uidlist->locked_refresh && refresh_when_locked) { |
| 141 | | | if (maildir_uidlist_refresh(uidlist) < 0) |
| 142 | | | return -1; |
| 143 | | | } |
| 144 | | | uidlist->lock_count++; |
| 145 | | | return 1; |
| 146 | | | } |
| 147 | | | |
| 148 | | | index_storage_lock_notify_reset(&uidlist->mbox->ibox); |
| 149 | | | |
| 150 | | | control_dir = mailbox_list_get_path(box->storage->list, box->name, |
| 151 | | | MAILBOX_LIST_PATH_TYPE_CONTROL); |
| 152 | [+] | | path = t_strconcat(control_dir, "/" MAILDIR_UIDLIST_NAME, NULL); |
 |
| 153 | | | |
| 154 | | | for (i = 0;; i++) { |
| 155 | | | old_mask = umask(0777 & ~box->file_create_mode); |
| 156 | | | ret = file_dotlock_create(&uidlist->dotlock_settings, path, |
Event 9:
path, which evaluates to NULL, is passed to file_dotlock_create() as the second argument. See related event 8.
hide
|
|
| 157 | [+] | | dotlock_flags, &uidlist->dotlock); |
 |
| |