(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/index-mail-headers.c) |
| |
| 419 | | | int (struct index_mail *mail, |
| 420 | | | struct *) |
| 421 | | | { |
| 422 | | | struct index_mail_data *data = &mail->data; |
Event 1:
data is set to &mail->data. - Dereferenced later, causing the null pointer dereference.
hide
|
|
| 423 | | | struct istream *input; |
| 424 | | | uoff_t old_offset; |
| 425 | | | |
| 426 | | | old_offset = data->stream == NULL ? 0 : data->stream->v_offset; |
Event 2:
data->stream == (void *)0 evaluates to true.
hide
Event 3:
Considering the case where data->stream is equal to 0 so mail->data.stream must have been equal to 0. See related event 1.
hide
|
|
| 427 | | | |
| 428 | [+] | | if (mail_get_stream(&mail->mail.mail, NULL, NULL, &input) < 0) |
 |
| 429 | | | return -1; |
| 430 | | | |
| 431 | | | (mail, ); |
| 432 | | | |
| 433 | | | if (data->parts == NULL || data->save_bodystructure_header) { |
| 434 | | | |
| 435 | | | |
| 436 | | | index_mail_init_parser(mail); |
| 437 | | | (data->parser_ctx, &data->hdr_size,
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-mail/message-parser.h |
| |
98 | # define (ctx, hdr_size, callback, context) \ |
99 | ({(void)(1 ? 0 : callback((struct message_part *)0, \ |
100 | (struct *)0, context)); \ |
101 | (ctx, hdr_size, \ |
102 | ( *)callback, context); }) |
| |
|
| 438 | | | , |
| 439 | | | mail); |
| 440 | | | } else { |
| 441 | | | |
| 442 | | | (data->stream, &data->hdr_size,
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-mail/message-header-parser.h |
| |
66 | # define (input, hdr_size, flags, callback, context) \ |
67 | ({(void)(1 ? 0 : callback((struct *)0, context)); \ |
68 | (input, hdr_size, flags, \ |
69 | ( *)callback, context); }) |
| |
|
| 443 | | | hdr_parser_flags, |
| 444 | [+] | | , mail); |
Event 7:
1 evaluates to true.
hide
Event 8:
data->stream, which evaluates to mail->data.stream, is passed to () as the first argument. See related event 1.
hide
|
|
 |
| |