Text   |  XML   |  ReML   |   Visible Warnings:

Null Pointer Dereference  at mbox-save.c:610

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

mbox_save_continue

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/mbox/mbox-save.c)expand/collapse
Show more  
 569  int mbox_save_continue(struct mail_save_context *_ctx)
 570  {
 571          struct mbox_save_context *ctx = (struct mbox_save_context *)_ctx;
 572          const unsigned char *data;
 573          size_t i, size;
 574          ssize_t ret;
 575   
 576          if (ctx->failed)
 577                  return -1;
 578   
 579          if (ctx->eoh_offset != (uoff_t)-1) {
 580                  /* writing body */
 581                  return mbox_save_body(ctx);
 582          }
 583   
 584[+]         while ((ret = i_stream_read(ctx->input)) > 0) {
 585                  if (ctx->mail != NULL)
 586                          index_mail_cache_parse_continue(ctx->mail);
 587   
 588[+]                 data = i_stream_get_data(ctx->input, &size);
 589                  for (i = 0; i < size; i++) {
 590                          if (data[i] == '\n' &&
 591                              ((i == 0 && ctx->last_char == '\n') ||
 592                               (i > 0 && data[i-1] == '\n'))) {
 593                                  /* end of headers. we don't need to worry about
 594                                     CRs because they're dropped */
 595                                  break;
 596                          }
 597                  }
 598                  if (i != size) {
 599                          /* found end of headers. write the rest of them 
 600                             (not including the finishing empty line) */
 601                          if (o_stream_send(ctx->output, data, i) < 0)
 602                                  return write_error(ctx);
 603                          ctx->last_char = '\n';
 604                          i_stream_skip(ctx->input, i + 1);
 605                          break;
 606                  }
 607   
 608                  if (o_stream_send(ctx->output, data, size) < 0)
 609                          return write_error(ctx);
 610                  ctx->last_char = data[size-1];
 611                  i_stream_skip(ctx->input, size);
Show more  




Change Warning 7424.26048 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: