Text   |  XML   |  ReML   |   Visible Warnings:

Null Pointer Dereference  at mbox-sync.c:392

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

mbox_sync_update_flags

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/mbox/mbox-sync.c)expand/collapse
Show more  
 357  static void mbox_sync_update_flags(struct mbox_sync_mail_context *mail_ctx,
 358                                     const struct mail_index_record *rec)
 359  {
 360          struct mbox_sync_context *sync_ctx = mail_ctx->sync_ctx;
 361          struct mailbox *box = &sync_ctx->mbox->ibox.box;
 362          struct mbox_sync_mail *mail = &mail_ctx->mail;
 363          enum mail_index_sync_type sync_type;
 364          ARRAY_TYPE(keyword_indexes) orig_keywords = ARRAY_INIT;
 365          uint8_t flags, orig_flags;
 366   
 367          if (rec != NULL) {
 368                  if ((rec->flags & MAIL_INDEX_MAIL_FLAG_DIRTY) != 0) {
 369                          /* flags and keywords are dirty. replace the current 
 370                             ones from the flags in index file. */
 371                          mbox_sync_get_dirty_flags(mail_ctx, rec);
 372                  }
 373          }
 374   
 375          flags = orig_flags = mail->flags & MAIL_FLAGS_NONRECENT;
 376[+]         if (array_is_created(&mail->keywords)) {
 377                  t_array_init(&orig_keywords, 32);
 378                  array_append_array(&orig_keywords, &mail->keywords);
 379          }
 380   
 381          /* apply new changes */
 382          index_sync_changes_apply(sync_ctx->sync_changes,
 383                                   sync_ctx->mail_keyword_pool,
 384[+]                                  &flags, &mail->keywords, &sync_type);
 385          if (flags != orig_flags ||
 386              !index_keyword_array_cmp(&mail->keywords, &orig_keywords)) {
 387                  mail_ctx->need_rewrite = TRUE;
 388                  mail->flags = flags | (mail->flags & MAIL_RECENT) |
 389                          MAIL_INDEX_MAIL_FLAG_DIRTY;
 390          }
 391          if (sync_type != 0 && box->v.sync_notify != NULL) {
 392                  box->v.sync_notify(box, rec->uid,
 393                                     index_sync_type_convert(sync_type));
Show more  




Change Warning 7399.24625 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: