Text   |  XML   |  ReML   |   Visible Warnings:

Leak  at mail-copy.c:27

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

mail_storage_copy

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/mail-copy.c)expand/collapse
Show more  
 8  int mail_storage_copy(struct mail_save_context *ctx, struct mail *mail)
 9  {
 10          struct istream *input;
 11          const char *from_envelope, *guid;
 12          time_t received_date;
 13   
 14[+]         if (mail_get_stream(mail, NULL, NULL, &input) < 0)
 15                  return -1;
 16   
 17          if (ctx->received_date == (time_t)-1) {
 18                  if (mail_get_received_date(mail, &received_date) < 0)
 19                          return -1;
 20                  mailbox_save_set_received_date(ctx, received_date, 0);
 21          }
 22          if (ctx->from_envelope == NULL) {
 23                  if (mail_get_special(mail, MAIL_FETCH_FROM_ENVELOPE,
 24                                       &from_envelope) < 0)
 25                          return -1;
 26                  if (*from_envelope != '\0')
 27[+]                         mailbox_save_set_from_envelope(ctx, from_envelope);
expand/collapse

mailbox_save_set_from_envelope

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/mail-storage.c)expand/collapse
Show more  
 877  void mailbox_save_set_from_envelope(struct mail_save_context *ctx,
 878                                      const char *envelope)
 879  {
 880          i_free(ctx->from_envelope);
 881[+]         ctx->from_envelope = i_strdup(envelope);
expand/collapse

i_strdup

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/imem.c)expand/collapse
Show more  
 23  char *i_strdup(const char *str)
 24  {
 25      char *rv = strdup( str );
 26      if( !rv )
 27          abort();
 28      return rv;
Show more  
 882  }
Show more  
 28          }
 29          if (ctx->guid == NULL) {
 30                  if (mail_get_special(mail, MAIL_FETCH_GUID, &guid) < 0)
 31                          return -1;
 32                  if (*guid != '\0')
 33                          mailbox_save_set_guid(ctx, guid);
 34          }
 35   
 36[+]         if (mailbox_save_begin(&ctx, input) < 0)
expand/collapse

mailbox_save_begin

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/mail-storage.c)expand/collapse
Show more  
 898  int mailbox_save_begin(struct mail_save_context **ctx, struct istream *input)
 899  {
 900          struct mailbox *box = (*ctx)->transaction->box;
 901          int ret;
 902   
 903          if (box->v.save_begin == NULL) {
 904                  mail_storage_set_error(box->storage, MAIL_ERROR_NOTPOSSIBLE,
 905                                         "Saving messages not supported");
 906                  ret = -1;
 907          } else {
 908                  ret = box->v.save_begin(*ctx, input);
 909          }
 910   
 911          if (ret < 0) {
 912[+]                 mailbox_save_cancel(ctx);
expand/collapse

mailbox_save_cancel

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/mail-storage.c)expand/collapse
Show more  
 931  void mailbox_save_cancel(struct mail_save_context **_ctx)
 932  {
 933          struct mail_save_context *ctx = *_ctx;
 934   
 935          *_ctx = NULL;
 936          ctx->transaction->box->v.save_cancel(ctx);
 937  }
Show more  
Show more  
Show more  




Change Warning 7325.24852 : Leak

Priority:
State:
Finding:
Owner:
Note: