(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/dbox/dbox-sync.c) |
| |
| 106 | | | dbox_sync_lock_expunge_file(struct dbox_sync_context *ctx, unsigned int file_id) |
| 107 | | | { |
| 108 | | | struct dbox_index_record *rec; |
| 109 | | | enum dbox_index_file_lock_status lock_status; |
| 110 | | | int ret; |
| 111 | | | |
| 112 | | | ret = dbox_index_try_lock_file(ctx->mbox->dbox_index, file_id, |
| 113 | [+] | | &lock_status); |
 |
| 114 | | | if (ret < 0) |
Event 4:
Skipping " if". ret < 0 evaluates to false.
hide
|
|
| 115 | | | return -1; |
| 116 | | | |
| 117 | [+] | | rec = dbox_index_record_lookup(ctx->mbox->dbox_index, file_id); |
 |
| 118 | | | switch (lock_status) { |
Event 8:
lock_status evaluates to 0.
hide
|
|
| 119 | | | case DBOX_INDEX_FILE_LOCKED: |
| 120 | | | seq_range_array_add(&ctx->locked_files, 0, file_id); |
| 121 | | | rec->status = DBOX_INDEX_FILE_STATUS_NONAPPENDABLE; |
Null Pointer Dereference
rec is dereferenced here, but it is NULL. The issue can occur if the highlighted code executes. See related event 7. Show: All events | Only primary events |
|
| |