(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-index/mail-transaction-log.c) |
| |
| 237 | | | int mail_transaction_log_rotate(struct mail_transaction_log *log, bool reset) |
| 238 | | | { |
| 239 | | | struct mail_transaction_log_file *file; |
| 240 | | | const char *path = log->head->filepath; |
| 241 | | | struct stat st; |
| 242 | | | |
| 243 | | | i_assert(log->head->locked);
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 |
| |
|
Event 1:
Skipping " if". !log->head->locked evaluates to false.
hide
Event 2:
Skipping " if". !!log->head->locked evaluates to true.
hide
Event 3:
Skipping " if". !!!log->head->locked evaluates to false.
hide
Event 4:
Skipping " if". __builtin_expect(...) evaluates to false.
hide
|
|
| 244 | | | |
| 245 | | | if (MAIL_INDEX_IS_IN_MEMORY(log->index)) { |
Event 5:
Taking false branch. log->index->dir == (void *)0 evaluates to false.
hide
|
|
| 246 | | | file = mail_transaction_log_file_alloc_in_memory(log); |
| 247 | | | if (reset) { |
| 248 | | | file->hdr.prev_file_seq = 0; |
| 249 | | | file->hdr.prev_file_offset = 0; |
| 250 | | | } |
| 251 | | | } else { |
| 252 | | | |
| 253 | | | |
| 254 | | | if (fstat(log->head->fd, &st) < 0) { |
Event 6:
Taking true branch. fstat(log->head->fd, &st) < 0 evaluates to true.
hide
|
|
| 255 | | | mail_index_file_set_syscall_error(log->index, |
| 256 | | | file->filepath, "fstat()"); |
| |