Text   |  XML   |  ReML   |   Visible Warnings:

Null Pointer Dereference  at message-parser.c:103

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

parse_next_body_to_eof

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-mail/message-parser.c)expand/collapse
Show more  
 406  static int parse_next_body_to_eof(struct message_parser_ctx *ctx,
 407                                    struct message_block *block_r)
 408  {
 409          bool full;
 410          int ret;
 411   
 412[+]         if ((ret = message_parser_read_more(ctx, block_r, &full)) <= 0)
 413                  return ret;
 414   
 415[+]         parse_body_add_block(ctx, block_r);
expand/collapse

parse_body_add_block

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-mail/message-parser.c)expand/collapse
Show more  
 79  static void parse_body_add_block(struct message_parser_ctx *ctx,
 80                                   struct message_block *block)
 81  {
 82          unsigned int missing_cr_count = 0;
 83          const unsigned char *data = block->data;
 84          size_t i;
 85   
 86          block->hdr = NULL;
 87   
 88          for (i = 0; i < block->size; i++) {
 89                  if (data[i] <= '\n') {
 90                          if (data[i] == '\n') {
 91                                  ctx->part->body_size.lines++;
 92                                  if ((i > 0 && data[i-1] != '\r') ||
 93                                      (i == 0 && ctx->last_chr != '\r'))
 94                                          missing_cr_count++;
 95                          } else if (data[i] == '\0')
 96                                  ctx->part->flags |= MESSAGE_PART_FLAG_HAS_NULS;
 97                  }
 98          }
 99   
 100          ctx->part->body_size.physical_size += block->size;
 101          ctx->part->body_size.virtual_size += block->size + missing_cr_count;
 102   
 103          ctx->last_chr = data[i-1];
Show more  
Show more  




Change Warning 7166.24472 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: