(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/dbox/dbox-index.c) |
| |
| 799 | | | static int dbox_index_append_commit_new(struct dbox_index_append_context *ctx, |
| 800 | | | struct dbox_file *file, string_t *str) |
| 801 | | | { |
| 802 | | | struct mail_storage *storage = &ctx->index->mbox->storage->storage; |
| 803 | | | struct dbox_index_record rec; |
| 804 | | | struct stat st; |
| 805 | | | unsigned int file_id; |
| 806 | | | |
| 807 | | | i_assert(file->append_count > 0);
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". file->append_count > 0 evaluates to true.
hide
Event 2:
Skipping " if". !(file->append_count > 0) evaluates to false.
hide
Event 3:
Skipping " if". !!(file->append_count > 0) evaluates to true.
hide
Event 4:
Skipping " if". !!!(file->append_count > 0) evaluates to false.
hide
Event 5:
Skipping " if". __builtin_expect(...) evaluates to false.
hide
|
|
| 808 | | | |
| 809 | | | if (file->append_count == 1 && !file->maildir_file && |
Event 6:
Skipping " if". - file->append_count == 1 evaluates to true.
- file->maildir_file evaluates to true.
hide
|
|
| 810 | | | !dbox_file_can_append(file, 0)) { |
| 811 | | | |
| 812 | | | i_assert(file->last_append_uid != 0);
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 |
| |
|
| 813 | | | file_id = file->last_append_uid | DBOX_FILE_ID_FLAG_UID; |
| 814 | | | return dbox_file_assign_id(file, file_id); |
| 815 | | | } |
| 816 | | | |
| 817 | | | if (!ctx->) { |
Event 7:
Skipping " if". ctx-> evaluates to true.
hide
|
|
| 818 | | | if ((ctx->index) < 0) |
| 819 | | | return -1; |
| 820 | | | if ((ctx->index) < 0) { |
| 821 | | | (ctx->index); |
| 822 | | | return -1; |
| 823 | | | } |
| 824 | | | if (fstat(ctx->index->fd, &st) < 0) { |
| 825 | | | mail_storage_set_critical(storage, |
| 826 | | | "fstat(%s) failed: %m", ctx->index->path); |
| 827 | | | (ctx->index); |
| 828 | | | return -1; |
| 829 | | | } |
| 830 | | | ctx->output_offset = st.st_size; |
| 831 | | | ctx->new_record_idx = array_count(&ctx->index->records); |
| 832 | | | ctx->first_new_file_id = ctx->index->next_file_id; |
| 833 | | | ctx-> = TRUE; |
| 834 | | | } |
| 835 | | | |
| 836 | | | file_id = ctx->index->next_file_id++; |
| 837 | [+] | | if (dbox_file_assign_id(file, file_id) < 0) |
 |
| 838 | | | return -1; |
| 839 | | | |
| 840 | | | memset(&rec, 0, sizeof(rec)); |
| 841 | | | rec.file_id = file_id; |
| 842 | | | rec.file_offset = ctx->output_offset + str_len(str); |
| 843 | | | if (file->maildir_file) { |
Event 20:
Taking true branch. file->maildir_file evaluates to true.
hide
|
|
| 844 | | | rec.status = DBOX_INDEX_FILE_STATUS_MAILDIR; |
| 845 | | | rec.data = p_strdup(ctx->index->record_data_pool, |
| 846 | [+][+] | | dbox_file_maildir_get_index_data(file)); |
 |
 |
| |