(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/dbox/dbox-save.c) |
| |
| 430 | | | int dbox_transaction_save_commit_pre(struct dbox_save_context *ctx) |
| 431 | | | { |
| 432 | | | struct dbox_transaction_context *t = |
| 433 | | | (struct dbox_transaction_context *)ctx->ctx.transaction; |
| 434 | | | const struct *hdr; |
| 435 | | | uint32_t uid, next_uid; |
| 436 | | | |
| 437 | | | i_assert(ctx->finished);
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". !ctx->finished evaluates to false.
hide
Event 2:
Skipping " if". !!ctx->finished evaluates to true.
hide
Event 3:
Skipping " if". !!!ctx->finished evaluates to false.
hide
Event 4:
Skipping " if". __builtin_expect(...) evaluates to false.
hide
|
|
| 438 | | | |
| 439 | [+] | | if (dbox_sync_begin(ctx->mbox, &ctx->sync_ctx, FALSE, TRUE) < 0) { |
Event 5:
Skipping " if". !0 evaluates to true.
hide
|
|
 |
| 440 | | | ctx->failed = TRUE; |
| 441 | | | dbox_transaction_save_rollback(ctx); |
| 442 | | | return -1; |
| 443 | | | } |
| 444 | | | |
| 445 | | | hdr = (ctx->sync_ctx->sync_view); |
| 446 | | | uid = hdr->next_uid; |
| 447 | [+] | | mail_index_append_assign_uids(ctx->trans, uid, &next_uid); |
Event 12:
mail_index_append_assign_uids() does not initialize next_uid. - This may be because of a failure case or other special case for mail_index_append_assign_uids().
hide
|
|
 |
| 448 | | | |
| 449 | [+] | | if (dbox_save_commit(ctx, uid) < 0) { |
 |
| 450 | | | ctx->failed = TRUE; |
| 451 | | | dbox_transaction_save_rollback(ctx); |
| 452 | | | return -1; |
| 453 | | | } |
| 454 | | | |
| 455 | | | *t->ictx.saved_uid_validity = hdr->uid_validity; |
| 456 | | | *t->ictx.first_saved_uid = uid; |
| 457 | | | *t->ictx.last_saved_uid = next_uid - 1; |
Uninitialized Variable
next_uid was not initialized. The issue can occur if the highlighted code executes. See related event 12. Show: All events | Only primary events |
|
| |