(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-index/mail-index-modseq.c) |
| |
| 230 | | | uint64_t mail_index_modseq_lookup_keywords(struct mail_index_view *view, |
| 231 | | | const struct mail_keywords *keywords, |
| 232 | | | uint32_t seq) |
| 233 | | | { |
| 234 | [+] | | struct mail_index_map_modseq *mmap = mail_index_map_modseq(view); |
Event 1:
view is passed to mail_index_map_modseq().
hide
Event 2:
The resource of interest is allocated inside mail_index_map_modseq().
hide
|
|
 |
| 235 | | | unsigned int i, metadata_idx; |
| 236 | | | uint64_t modseq, highest_modseq = 0; |
| 237 | | | |
| 238 | | | if (mmap != NULL) { |
Event 23:
Taking true branch. mmap != (void *)0 evaluates to true.
hide
|
|
| 239 | | | |
| 240 | | | for (i = 0; i < keywords->count; i++) { |
Event 24:
Leaving loop. i < keywords->count evaluates to false.
hide
|
|
| 241 | | | metadata_idx = METADATA_MODSEQ_IDX_KEYWORD_START + |
| 242 | | | keywords->idx[i]; |
| 243 | | | |
| 244 | | | modseq = modseq_idx_lookup(mmap, metadata_idx, seq); |
| 245 | | | if (highest_modseq < modseq) |
| 246 | | | highest_modseq = modseq; |
| 247 | | | } |
| 248 | | | } |
| 249 | | | |
| 250 | | | if (highest_modseq == 0) { |
Event 25:
Taking true branch. highest_modseq == 0 evaluates to true.
hide
|
|
| 251 | | | |
| 252 | | | highest_modseq = mail_index_modseq_lookup(view, seq); |
| 253 | | | } |
| 254 | | | return highest_modseq; |
Leak
There are no remaining references to the resource malloc(size) from imem.c:9. The issue can occur if the highlighted code executes. See related events 2, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 26, and 27. Show: All events | Only primary events |
|
| |