Text   |  XML   |  ReML   |   Visible Warnings:

Null Pointer Dereference  at mailbox-list-fs-iter.c:591

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

list_file

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/list/mailbox-list-fs-iter.c)expand/collapse
Show more  
 540  list_file(struct fs_list_iterate_context *ctx,
 541            const struct list_dir_entry *entry)
 542  {
 543          struct mail_namespace *ns = ctx->ctx.list->ns;
 544          const char *fname = entry->fname;
 545          const char *list_path;
 546          enum imap_match_result match;
 547          int ret;
 548   
 549          /* skip . and .. */
 550          if (fname[0] == '.' &&
 551              (fname[1] == '\0' ||
 552               (fname[1] == '.' && fname[2] == '\0')))
 553                  return 0;
 554   
 555          /* check the pattern */
 556[+]         list_path = t_strconcat(ctx->dir->virtual_path, fname, NULL);
 557[+]         match = imap_match(ctx->glob, list_path);
 558          if (match != IMAP_MATCH_YES && (match & IMAP_MATCH_CHILDREN) == 0 &&
 559              !ctx->dir->delayed_send)
 560                  return 0;
 561   
 562          if (strcmp(fname, ctx->ctx.list->set.maildir_name) == 0) {
 563                  /* mail storage's internal directory */
 564                  return 0;
 565          }
 566   
 567          /* get the info.flags using callback */
 568          ctx->info.flags = 0;
 569          ret = ctx->ctx.list->v.
 570                  iter_is_mailbox(&ctx->ctx, ctx->dir->real_path, fname,
 571                                  list_path, entry->type, &ctx->info.flags);
 572          if (ret <= 0)
 573                  return ret;
 574   
 575          if (ctx->dir->delayed_send) {
 576                  /* send the parent directory first, then handle this 
 577                     file again if needed */
 578                  ctx->dir->delayed_send = FALSE;
 579                  if (match == IMAP_MATCH_YES ||
 580                      (match & IMAP_MATCH_CHILDREN) != 0)
 581                          ctx->dir->next_entry = entry;
 582                  ctx->info = ctx->dir->info;
 583                  ctx->info.flags |= MAILBOX_CHILDREN;
 584                  return 1;
 585          }
 586   
 587          ctx->info.flags |= fs_list_get_subscription_flags(ctx, list_path);
 588   
 589          /* make sure we give only one correct INBOX */
 590          if ((ns->flags & NAMESPACE_FLAG_INBOX) != 0) {
 591                  if (strcasecmp(list_path, "INBOX") == 0) {
Show more  




Change Warning 7290.25049 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: