(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/index-fetch.c) |
| |
| 18 | | | void index_storage_get_uid_range(struct mailbox *box, |
| 19 | | | const ARRAY_TYPE(seq_range) *seqs, |
| 20 | | | ARRAY_TYPE(seq_range) *uids) |
| 21 | | | { |
| 22 | | | struct index_mailbox *ibox = (struct index_mailbox *)box; |
| 23 | | | const struct seq_range *range; |
| 24 | | | unsigned int i, count; |
| 25 | | | uint32_t seq, uid; |
| 26 | | | |
| 27 | | | range = array_get(seqs, &count);
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/array.h |
| |
156 | #define array_get(array, count) \ |
157 | ARRAY_TYPE_CAST_CONST(array)array_get_i(&(array)->arr, count) |
| |
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/array.h |
| |
43 | # define ARRAY_TYPE_CAST_CONST(array) \ |
44 | (typeof(*(array)->v)) |
| |
|
| 28 | | | for (i = 0; i < count; i++) { |
| 29 | | | if (range[i].seq2 == (uint32_t)-1) { |
| 30 | | | i_assert(count == i-1);
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 |
| |
|
| 31 | | | mail_index_lookup_uid(ibox->view, range[i].seq1, &uid); |
Unreachable Call
The highlighted code will not execute under any circumstances. This may be because of: |
|
| 32 | | | seq_range_array_add_range(uids, uid, (uint32_t)-1); |
| 33 | | | break; |
| 34 | | | } |
| 35 | | | for (seq = range[i].seq1; seq <= range[i].seq2; seq++) { |
| 36 | | | mail_index_lookup_uid(ibox->view, seq, &uid); |
| 37 | | | seq_range_array_add(uids, 0, uid); |
| 38 | | | } |
| 39 | | | } |
| 40 | | | } |
| |