Text   |  XML   |  ReML   |   Visible Warnings:

Null Pointer Dereference  at lazy-expunge-plugin.c:494

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

lazy_expunge_mailbox_list_delete

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/plugins/lazy-expunge/lazy-expunge-plugin.c)expand/collapse
Show more  
 454  lazy_expunge_mailbox_list_delete(struct mailbox_list *list, const char *name)
 455  {
 456          struct lazy_expunge_mail_user *luser =
 457                  LAZY_EXPUNGE_USER_CONTEXT(list->ns->user);
 458          struct lazy_expunge_mailbox_list *llist =
 459                  LAZY_EXPUNGE_LIST_CONTEXT(list);
 460          struct lazy_expunge_mail_storage *lstorage;
 461          struct mailbox_list *dest_list;
 462          enum mailbox_name_status status;
 463          const char *destname;
 464          struct tm *tm;
 465          char timestamp[256];
 466          int ret;
 467   
 468          if (llist->storage == NULL) {
 469                  /* not a maildir storage */
 470                  return llist->module_ctx.super.delete_mailbox(list, name);
 471          }
 472   
 473          lstorage = LAZY_EXPUNGE_CONTEXT(llist->storage);
 474          if (lstorage->internal_namespace)
 475                  return llist->module_ctx.super.delete_mailbox(list, name);
 476   
 477          /* first do the normal sanity checks */
 478          if (strcmp(name, "INBOX") == 0) {
 479                  mailbox_list_set_error(list, MAIL_ERROR_NOTPOSSIBLE,
 480                                         "INBOX can't be deleted.");
 481                  return -1;
 482          }
 483   
 484[+]         if (mailbox_list_get_mailbox_name_status(list, name, &status) < 0)
 485                  return -1;
 486          if (status == MAILBOX_NAME_INVALID) {
 487                  mailbox_list_set_error(list, MAIL_ERROR_PARAMS,
 488                                         "Invalid mailbox name");
 489                  return -1;
 490          }
 491   
 492          /* destination mailbox name needs to contain a timestamp */
 493          tm = localtime(&ioloop_time);
 494          if (strftime(timestamp, sizeof(timestamp), "%Y%m%d-%H%M%S", tm) == 0)
Show more  




Change Warning 8116.25019 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: