(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/dbox/dbox-file.c) |
| |
| 574 | | | static int (struct dbox_file *file, uint32_t *uid_r, |
| 575 | | | uoff_t *physical_size_r) |
| 576 | | | { |
| 577 | | | struct hdr; |
| 578 | | | const unsigned char *data; |
| 579 | | | size_t size; |
| 580 | | | int ret; |
| 581 | | | |
| 582 | | | if (file->maildir_file) |
Event 1:
Skipping " if". file->maildir_file evaluates to false.
hide
|
|
| 583 | | | return dbox_file_get_maildir_data(file, uid_r, physical_size_r); |
| 584 | | | |
| 585 | | | ret = i_stream_read_data(file->input, &data, &size, |
Event 2:
&data is passed to i_stream_read_data() as the second argument.
hide
|
|
| 586 | [+] | | file-> - 1); |
 |
| 587 | | | if (ret <= 0) { |
Event 8:
Skipping " if". ret <= 0 evaluates to false.
hide
|
|
| 588 | | | if (file->input->stream_errno == 0) { |
| 589 | | | |
| 590 | | | return 0; |
| 591 | | | } |
| 592 | | | dbox_file_set_syscall_error(file, "read"); |
| 593 | | | return -1; |
| 594 | | | } |
| 595 | | | if (data[file->-1] != '\n') |
Null Pointer Dereference
data is dereferenced here, but it is NULL. The issue can occur if the highlighted code executes. See related event 6. Show: All events | Only primary events |
|
| |