(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-index/mail-transaction-log.c) |
| |
| 356 | | | int mail_transaction_log_find_file(struct mail_transaction_log *log, |
| 357 | | | uint32_t file_seq, bool nfs_flush, |
| 358 | | | struct mail_transaction_log_file **file_r) |
| 359 | | | { |
| 360 | | | struct mail_transaction_log_file *file; |
| 361 | | | const char *path; |
| 362 | | | int ret; |
| 363 | | | |
| 364 | | | if (file_seq > log->head->hdr.file_seq) { |
Event 1:
Skipping " if". file_seq > log->head->hdr.file_seq evaluates to false.
hide
|
|
| 365 | | | |
| 366 | | | if (log->head->locked) { |
| 367 | | | |
| 368 | | | |
| 369 | | | return 0; |
| 370 | | | } |
| 371 | | | |
| 372 | | | if (mail_transaction_log_refresh(log, FALSE) < 0) |
| 373 | | | return -1; |
| 374 | | | if (file_seq > log->head->hdr.file_seq) { |
| 375 | | | if (!nfs_flush || !log->index->nfs_flush) |
| 376 | | | return 0; |
| 377 | | | |
| 378 | | | if (mail_transaction_log_refresh(log, TRUE) < 0) |
| 379 | | | return -1; |
| 380 | | | if (file_seq > log->head->hdr.file_seq) |
| 381 | | | return 0; |
| 382 | | | } |
| 383 | | | } |
| 384 | | | |
| 385 | | | for (file = log->files; file != NULL; file = file->next) { |
Event 2:
Leaving loop. file != (void *)0 evaluates to false.
hide
|
|
| 386 | | | if (file->hdr.file_seq == file_seq) { |
| 387 | | | *file_r = file; |
| 388 | | | return 1; |
| 389 | | | } |
| 390 | | | } |
| 391 | | | |
| 392 | | | if (MAIL_INDEX_IS_IN_MEMORY(log->index)) |
Event 3:
Skipping " if". log->index->dir == (void *)0 evaluates to false.
hide
|
|
| 393 | | | return 0; |
| 394 | | | |
| 395 | | | |
| 396 | | | path = t_strconcat(log->index->filepath, |
Event 9:
path is set to t_strconcat(...), which evaluates to NULL. See related event 8.
hide
|
|
| 397 | [+] | | MAIL_TRANSACTION_LOG_SUFFIX".2", NULL); |
 |
| 398 | [+] | | file = mail_transaction_log_file_alloc(log, path); |
Event 10:
path, which evaluates to NULL, is passed to mail_transaction_log_file_alloc() as the second argument. See related event 9.
hide
|
|
 |
| |