Text   |  XML   |  ReML   |   Visible Warnings:

Leak  at cmd-create.c:42

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

cmd_create

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/imap/cmd-create.c)expand/collapse
Show more  
 7  bool cmd_create(struct client_command_context *cmd)
 8  {
 9          struct mail_namespace *ns;
 10          const char *mailbox, *full_mailbox;
 11          bool directory;
 12          size_t len;
 13   
 14          /* <mailbox> */
 15[+]         if (!client_read_string_args(cmd, 1, &mailbox))
 16                  return FALSE;
 17          full_mailbox = mailbox;
 18   
 19          ns = client_find_namespace(cmd, &mailbox);
 20          if (ns == NULL)
 21                  return TRUE;
 22   
 23          len = strlen(full_mailbox);
 24          if (len == 0 || full_mailbox[len-1] != ns->sep)
 25                  directory = FALSE;
 26          else if (*mailbox == '\0') {
 27                  client_send_tagline(cmd, "NO Namespace already exists.");
 28                  return TRUE;
 29          } else {
 30                  /* name ends with hierarchy separator - client is just 
 31                     informing us that it wants to create children under this 
 32                     mailbox. */
 33                  directory = TRUE;
 34                  mailbox = t_strndup(mailbox, strlen(mailbox)-1);
 35                  full_mailbox = t_strndup(full_mailbox, len-1);
 36          }
 37   
 38          if (!client_verify_mailbox_name(cmd, full_mailbox,
 39[+]                                         CLIENT_VERIFY_MAILBOX_SHOULD_NOT_EXIST))
 40                  return TRUE;
 41   
 42[+]         if (mail_storage_mailbox_create(ns->storage, mailbox, directory) < 0)
expand/collapse

mail_storage_mailbox_create

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/mail-storage.c)expand/collapse
Show more  
 338  int mail_storage_mailbox_create(struct mail_storage *storage, const char *name,
 339                                  bool directory)
 340  {
 341          mail_storage_clear_error(storage);
 342   
 343[+]         if (!mailbox_list_is_valid_create_name(storage->list, name)) {
 344                  mail_storage_set_error(storage, MAIL_ERROR_PARAMS,
 345[+]                                        "Invalid mailbox name");
expand/collapse

mail_storage_set_error

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/mail-storage.c)expand/collapse
Show more  
 273  void mail_storage_set_error(struct mail_storage *storage,
 274                              enum mail_error error, const char *string)
 275  {
 276          i_free(storage->error_string);
 277[+]         storage->error_string = i_strdup(string);
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  
 278          storage->error = error;
Show more  
Show more  
Show more  




Change Warning 7973.24989 : Leak

Priority:
State:
Finding:
Owner:
Note: