(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-index/mail-index.c) |
| |
| 386 | | | int mail_index_open(struct mail_index *index, enum mail_index_open_flags flags, |
| 387 | | | enum file_lock_method lock_method) |
| 388 | | | { |
| 389 | | | int ret; |
| 390 | | | |
| 391 | | | if (index->opened) { |
Event 1:
Skipping " if". index->opened evaluates to false.
hide
|
|
| 392 | | | if (index->map != NULL && |
| 393 | | | (index->map->hdr.flags & |
| 394 | | | MAIL_INDEX_HDR_FLAG_CORRUPTED) != 0) { |
| 395 | | | |
| 396 | | | mail_index_close(index); |
| 397 | | | } else { |
| 398 | | | i_assert(index->map != NULL);
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/macros.h |
| |
189 | #define i_assert(expr) STMT_START{ \ |
190 | if (unlikely(!(expr))) \ |
191 | i_panic("file %s: line %d (%s): assertion failed: (%s)", \ |
192 | __FILE__, \ |
193 | __LINE__, \ |
194 | __PRETTY_FUNCTION__, \ |
195 | #expr); }STMT_END |
| |
|
| 399 | | | return 1; |
| 400 | | | } |
| 401 | | | } |
| 402 | | | |
| 403 | | | index->filepath = MAIL_INDEX_IS_IN_MEMORY(index) ? |
Event 2:
index->dir == (void *)0 evaluates to true.
hide
|
|
| 404 | [+] | | i_strdup("(in-memory index)") : |
Event 3:
The resource of interest is allocated inside i_strdup().
hide
|
|
 |
| 405 | | | i_strconcat(index->dir, "/", index->prefix, NULL); |
| 406 | | | |
| 407 | | | index->shared_lock_count = 0; |
| 408 | | | index->excl_lock_count = 0; |
| 409 | | | index->lock_type = F_UNLCK;
x /usr/include/bits/fcntl.h |
| |
134 | #define F_UNLCK 2 /* Remove lock. */ |
| |
|
| 410 | | | index->lock_id_counter = 2; |
| 411 | | | |
| 412 | | | index->readonly = FALSE; |
| 413 | | | index->nodiskspace = FALSE; |
| 414 | | | index->index_lock_timeout = FALSE; |
| 415 | | | index->log_locked = FALSE; |
| 416 | | | index->mmap_disable = (flags & MAIL_INDEX_OPEN_FLAG_MMAP_DISABLE) != 0; |
Event 10:
(flags & MAIL_INDEX_OPEN_FLAG_MMAP_DISABLE) != 0 evaluates to true.
hide
|
|
| 417 | | | index->use_excl_dotlocks = |
| 418 | | | (flags & MAIL_INDEX_OPEN_FLAG_DOTLOCK_USE_EXCL) != 0; |
Event 11:
(flags & MAIL_INDEX_OPEN_FLAG_DOTLOCK_USE_EXCL) != 0 evaluates to true.
hide
|
|
| 419 | | | index->fsync_disable = |
| 420 | | | (flags & MAIL_INDEX_OPEN_FLAG_FSYNC_DISABLE) != 0; |
Event 12:
(flags & MAIL_INDEX_OPEN_FLAG_FSYNC_DISABLE) != 0 evaluates to true.
hide
|
|
| 421 | | | index->nfs_flush = (flags & MAIL_INDEX_OPEN_FLAG_NFS_FLUSH) != 0; |
Event 13:
(flags & MAIL_INDEX_OPEN_FLAG_NFS_FLUSH) != 0 evaluates to false.
hide
|
|
| 422 | | | index->readonly = (flags & MAIL_INDEX_OPEN_FLAG_READONLY) != 0; |
Event 14:
(flags & MAIL_INDEX_OPEN_FLAG_READONLY) != 0 evaluates to false.
hide
|
|
| 423 | | | index->lock_method = lock_method; |
| 424 | | | |
| 425 | | | if (index->nfs_flush && index->fsync_disable) |
Event 15:
Skipping " if". index->nfs_flush evaluates to false.
hide
|
|
| 426 | | | i_fatal("nfs flush requires fsync_disable=no"); |
| 427 | | | if (index->nfs_flush && !index->mmap_disable) |
Event 16:
Skipping " if". index->nfs_flush evaluates to false.
hide
|
|
| 428 | | | i_fatal("nfs flush requires mmap_disable=yes"); |
| 429 | | | |
| 430 | [+] | | if ((ret = mail_index_open_files(index, flags)) <= 0) { |
 |
| |