(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/mbox/mbox-save.c) |
| |
| 653 | | | int mbox_save_finish(struct mail_save_context *_ctx) |
| 654 | | | { |
| 655 | | | struct mbox_save_context *ctx = (struct mbox_save_context *)_ctx; |
Event 1:
ctx is set to _ctx. - Dereferenced later, causing the null pointer dereference.
hide
|
|
| 656 | | | |
| 657 | | | if (!ctx->failed && ctx->eoh_offset == (uoff_t)-1) |
Event 2:
Skipping " if". - ctx->failed evaluates to false.
- ctx->eoh_offset == (uoff_t)-1 evaluates to false.
hide
|
|
| 658 | | | (void)(ctx); |
| 659 | | | |
| 660 | | | if (ctx->output != NULL) { |
Event 3:
Skipping " if". ctx->output != (void *)0 evaluates to false.
hide
Event 4:
Considering the case where ctx->output is equal to 0 so _ctx[2].guid must have been equal to 0. See related event 1.
hide
|
|
| 661 | | | |
| 662 | | | if (o_stream_flush(ctx->output) < 0) |
| 663 | | | write_error(ctx); |
| 664 | | | } |
| 665 | | | |
| 666 | | | ctx->finished = TRUE; |
Event 5:
!0 evaluates to true.
hide
|
|
| 667 | | | if (!ctx->failed) { |
Event 6:
Taking true branch. ctx->failed evaluates to false.
hide
|
|
| 668 | | | T_BEGIN {
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/data-stack.h |
| |
49 | #define T_BEGIN \ |
50 | STMT_START { unsigned int _data_stack_cur_id = t_push(); |
| |
|
| 669 | | | if (mbox_write_content_length(ctx) < 0 || |
Event 7:
Skipping " if". mbox_write_content_length(...) < 0 evaluates to false.
hide
|
|
| 670 | [+] | | mbox_append_lf(ctx) < 0) |
Event 8:
ctx, which evaluates to _ctx, is passed to mbox_append_lf(). See related event 1.
hide
|
|
 |
| |