Text   |  XML   |  ReML   |   Visible Warnings:

Null Pointer Dereference  at istream.c:324

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

index_mail_parse_headers

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/index-mail-headers.c)expand/collapse
Show more  
 419  int index_mail_parse_headers(struct index_mail *mail,
 420                               struct mailbox_header_lookup_ctx *headers)
 421  {
 422          struct index_mail_data *data = &mail->data;
 423          struct istream *input;
 424          uoff_t old_offset;
 425   
 426          old_offset = data->stream == NULL ? 0 : data->stream->v_offset;
 427   
 428[+]         if (mail_get_stream(&mail->mail.mail, NULL, NULL, &input) < 0)
 429                  return -1;
 430   
 431          index_mail_parse_header_init(mail, headers);
 432   
 433          if (data->parts == NULL || data->save_bodystructure_header) {
 434                  /* initialize bodystructure parsing in case we read the whole 
 435                     message. */
 436                  index_mail_init_parser(mail);
 437                  message_parser_parse_header(data->parser_ctx, &data->hdr_size,
 438                                              index_mail_parse_part_header_cb,
 439                                              mail);
 440          } else {
 441                  /* just read the header */
 442                  message_parse_header(data->stream, &data->hdr_size,
 443                                       hdr_parser_flags,
 444[+]                                      index_mail_parse_header_cb, mail);
expand/collapse

message_parse_header

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-mail/message-header-parser.c)expand/collapse
Show more  
 383  void message_parse_header(struct istream *input, struct message_size *hdr_size,
 384                            enum message_header_parser_flags flags,
 385                            message_header_callback_t *callback, void *context)
 386  {
 387          struct message_header_parser_ctx *hdr_ctx;
 388          struct message_header_line *hdr;
 389          int ret;
 390   
 391[+]         hdr_ctx = message_parse_header_init(input, hdr_size, flags);
 392[+]         while ((ret = message_parse_header_next(hdr_ctx, &hdr)) > 0)
expand/collapse

message_parse_header_next

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-mail/message-header-parser.c)expand/collapse
Show more  
 55  int message_parse_header_next(struct message_header_parser_ctx *ctx,
 56                                struct message_header_line **hdr_r)
 57  {
 58          struct message_header_line *line = &ctx->line;
 59          const unsigned char *msg;
 60          size_t i, size, startpos, colon_pos, parse_size, value_pos;
 61          int ret;
 62          bool continued, continues, last_no_newline, last_crlf;
 63          bool no_newline, crlf_newline;
 64   
 65          *hdr_r = NULL;
 66          if (line->eoh)
 67                  return -1;
 68   
 69          if (ctx->skip > 0) {
 70                  i_stream_skip(ctx->input, ctx->skip);
 71                  ctx->skip = 0;
 72          }
 73   
 74          if (line->continues)
 75                  colon_pos = 0;
 76          else {
 77                  /* new header line */
 78                  line->name_offset = ctx->input->v_offset;
 79                  colon_pos = UINT_MAX;
 80                  buffer_set_used_size(ctx->value_buf, 0);
 81          }
 82   
 83          no_newline = FALSE;
 84          crlf_newline = FALSE;
 85          continued = line->continues;
 86          continues = FALSE;
 87   
 88          for (startpos = 0;;) {
 89[+]                 ret = i_stream_read_data(ctx->input, &msg, &size, startpos+1);
expand/collapse

i_stream_read_data

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/istream.c)expand/collapse
Show more  
 349  int i_stream_read_data(struct istream *stream, const unsigned char **data_r,
 350                         size_t *size_r, size_t threshold)
 351  {
 352          ssize_t ret = 0;
 353          bool read_more = FALSE;
 354   
 355          do {
 356[+]                 *data_r = i_stream_get_data(stream, size_r);
expand/collapse

i_stream_get_data

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/istream.c)expand/collapse
Show more  
 321  const unsigned char *
 322  i_stream_get_data(const struct istream *stream, size_t *size_r)
 323  {
 324          const struct istream_private *_stream = stream->real_stream;
Show more  
Show more  
Show more  
Show more  
Show more  




Change Warning 11527.26035 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: