Text   |  XML   |  ReML   |   Visible Warnings:

Null Pointer Dereference  at imem.c:25

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

list_file_subdir

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/list/mailbox-list-fs-iter.c)expand/collapse
Show more  
 483  list_file_subdir(struct fs_list_iterate_context *ctx,
 484                   enum imap_match_result match, const char *list_path,
 485                   const char *fname)
 486  {
 487          struct list_dir_context *dir;
 488          DIR *dirp;
 489          enum imap_match_result match2;
 490          const char *vpath, *real_path;
 491          bool scan_subdir, delayed_send = FALSE;
 492          int ret;
 493   
 494          vpath = t_strdup_printf("%s%c", list_path, ctx->sep);
 495          match2 = imap_match(ctx->glob, vpath);
 496   
 497          if (match == IMAP_MATCH_YES)
 498                  ctx->info.name = p_strdup(ctx->info_pool, list_path);
 499          else if (match2 == IMAP_MATCH_YES)
 500                  ctx->info.name = p_strdup(ctx->info_pool, vpath);
 501          else 
 502                  ctx->info.name = NULL;
 503   
 504          scan_subdir = (match2 & (IMAP_MATCH_YES | IMAP_MATCH_CHILDREN)) != 0;
 505          if ((match == IMAP_MATCH_YES || scan_subdir) &&
 506              ctx->info.name != NULL &&
 507              (ctx->ctx.flags & MAILBOX_LIST_ITER_RETURN_CHILDREN) != 0 &&
 508              (ctx->info.flags & (MAILBOX_CHILDREN | MAILBOX_NOCHILDREN)) == 0) {
 509                  scan_subdir = TRUE;
 510                  delayed_send = TRUE;
 511          }
 512   
 513          if (scan_subdir) {
 514[+]                 real_path = t_strconcat(ctx->dir->real_path, "/", fname, NULL);
 515[+]                 ret = list_opendir(ctx, real_path, vpath, &dirp);
 516          } else {
 517                  ret = 0;
 518          }
 519          if (ret > 0) {
 520                  dir = i_new(struct list_dir_context, 1);
 521                  dir->dirp = dirp;
 522[+]                 dir->real_path = i_strdup(real_path);
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 );
Show more  
Show more  




Change Warning 11830.24971 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: