Text   |  XML   |  ReML   |   Visible Warnings:

Null Pointer Dereference  at imap-match.c:194

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);
expand/collapse

imap_match

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-imap/imap-match.c)expand/collapse
Show more  
 308  imap_match(struct imap_match_glob *glob, const char *data)
 309  {
 310          struct imap_match_context ctx;
 311          unsigned int i;
 312          enum imap_match_result ret, match;
 313   
 314          match = IMAP_MATCH_NO;
 315          ctx.sep = glob->sep;
 316          for (i = 0; glob->patterns[i].pattern != NULL; i++) {
 317                  ctx.inboxcase = glob->patterns[i].inboxcase;
 318   
 319[+]                 ret = imap_match_pattern(&ctx, data, glob->patterns[i].pattern);
expand/collapse

imap_match_pattern

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-imap/imap-match.c)expand/collapse
Show more  
 264  imap_match_pattern(struct imap_match_context *ctx,
 265                     const char *data, const char *pattern)
 266  {
 267          enum imap_match_result ret, match;
 268   
 269          ctx->inboxcase_end = data;
 270          if (ctx->inboxcase && strncasecmp(data, inbox, INBOXLEN) == 0 &&
 271              (data[INBOXLEN] == '\0' || data[INBOXLEN] == ctx->sep)) {
 272                  /* data begins with INBOX/, use case-insensitive comparison 
 273                     for it */
 274                  ctx->inboxcase_end += INBOXLEN;
 275          }
 276   
 277          if (*pattern != '*') {
 278                  /* handle the pattern up to the first '*' */
 279[+]                 ret = match_sub(ctx, &data, &pattern);
expand/collapse

match_sub

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-imap/imap-match.c)expand/collapse
Show more  
 184  match_sub(struct imap_match_context *ctx, const char **data_p,
 185            const char **pattern_p)
 186  {
 187          enum imap_match_result ret, match;
 188          unsigned int i;
 189          const char *data = *data_p, *pattern = *pattern_p;
 190   
 191          /* match all non-wildcards */
 192          i = 0;
 193          while (pattern[i] != '\0' && pattern[i] != '*' && pattern[i] != '%') {
 194                  if (!CMP_CUR_CHR(ctx, data+i, pattern+i)) {
Show more  
Show more  
Show more  
Show more  




Change Warning 7288.25047 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: